blob: afe4c3896ed2f8b330985a5f65f0aab46fab9dbb [file] [log] [blame]
Stan Iliev1a025a72018-09-05 16:35:11 -04001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "Readback.h"
18
Kevin Lubick1175dc02022-02-28 12:41:27 -050019#include <SkBitmap.h>
20#include <SkBlendMode.h>
21#include <SkCanvas.h>
22#include <SkColorSpace.h>
23#include <SkImage.h>
Kevin Lubickdd8b2ea2023-03-17 19:55:58 +000024#include <SkImageAndroid.h>
Kevin Lubick1175dc02022-02-28 12:41:27 -050025#include <SkImageInfo.h>
26#include <SkMatrix.h>
27#include <SkPaint.h>
28#include <SkRect.h>
29#include <SkRefCnt.h>
30#include <SkSamplingOptions.h>
31#include <SkSurface.h>
Kevin Lubick8099b672023-01-09 14:48:45 +000032#include "include/gpu/GpuTypes.h" // from Skia
Kevin Lubick6817fc42023-05-12 19:27:20 +000033#include <include/gpu/ganesh/SkSurfaceGanesh.h>
Alec Mouri97326742022-11-04 01:32:24 +000034#include <gui/TraceUtils.h>
35#include <private/android/AHardwareBufferHelpers.h>
36#include <shaders/shaders.h>
37#include <sync/sync.h>
38#include <system/window.h>
39
40#include "DeferredLayerUpdater.h"
41#include "Properties.h"
42#include "Tonemapper.h"
43#include "hwui/Bitmap.h"
44#include "pipeline/skia/LayerDrawable.h"
45#include "renderthread/EglManager.h"
46#include "renderthread/VulkanManager.h"
Stan Iliev1a025a72018-09-05 16:35:11 -040047#include "utils/Color.h"
48#include "utils/MathUtils.h"
Alec Mouri45238012020-01-29 11:04:40 -080049#include "utils/NdkUtils.h"
Stan Iliev1a025a72018-09-05 16:35:11 -040050
51using namespace android::uirenderer::renderthread;
52
53namespace android {
54namespace uirenderer {
55
John Reck2abc5492021-05-18 00:34:26 -040056#define ARECT_ARGS(r) float((r).left), float((r).top), float((r).right), float((r).bottom)
57
John Reck4d73cb12022-07-27 10:32:52 -040058void Readback::copySurfaceInto(ANativeWindow* window, const std::shared_ptr<CopyRequest>& request) {
Stan Iliev1a025a72018-09-05 16:35:11 -040059 ATRACE_CALL();
60 // Setup the source
Alec Mouri8a82b142019-12-17 09:41:48 -080061 AHardwareBuffer* rawSourceBuffer;
62 int rawSourceFence;
John Reck2abc5492021-05-18 00:34:26 -040063 ARect cropRect;
64 uint32_t windowTransform;
65 status_t err = ANativeWindow_getLastQueuedBuffer2(window, &rawSourceBuffer, &rawSourceFence,
66 &cropRect, &windowTransform);
67 base::unique_fd sourceFence(rawSourceFence);
68 // Really this shouldn't ever happen, but better safe than sorry.
69 if (err == UNKNOWN_TRANSACTION) {
70 ALOGW("Readback failed to ANativeWindow_getLastQueuedBuffer2 - who are we talking to?");
John Reck4d73cb12022-07-27 10:32:52 -040071 return request->onCopyFinished(CopyResult::SourceInvalid);
John Reck2abc5492021-05-18 00:34:26 -040072 }
73 ALOGV("Using new path, cropRect=" RECT_STRING ", transform=%x", ARECT_ARGS(cropRect),
74 windowTransform);
75
76 if (err != NO_ERROR) {
77 ALOGW("Failed to get last queued buffer, error = %d", err);
John Reck4d73cb12022-07-27 10:32:52 -040078 return request->onCopyFinished(CopyResult::SourceInvalid);
John Reck2abc5492021-05-18 00:34:26 -040079 }
80 if (rawSourceBuffer == nullptr) {
81 ALOGW("Surface doesn't have any previously queued frames, nothing to readback from");
John Reck4d73cb12022-07-27 10:32:52 -040082 return request->onCopyFinished(CopyResult::SourceEmpty);
John Reck2abc5492021-05-18 00:34:26 -040083 }
84 UniqueAHardwareBuffer sourceBuffer{rawSourceBuffer};
85 AHardwareBuffer_Desc description;
86 AHardwareBuffer_describe(sourceBuffer.get(), &description);
87 if (description.usage & AHARDWAREBUFFER_USAGE_PROTECTED_CONTENT) {
88 ALOGW("Surface is protected, unable to copy from it");
John Reck4d73cb12022-07-27 10:32:52 -040089 return request->onCopyFinished(CopyResult::SourceInvalid);
John Reck2abc5492021-05-18 00:34:26 -040090 }
91
John Reck4d73cb12022-07-27 10:32:52 -040092 {
93 ATRACE_NAME("sync_wait");
94 if (sourceFence != -1 && sync_wait(sourceFence.get(), 500 /* ms */) != NO_ERROR) {
95 ALOGE("Timeout (500ms) exceeded waiting for buffer fence, abandoning readback attempt");
96 return request->onCopyFinished(CopyResult::Timeout);
97 }
John Reck2abc5492021-05-18 00:34:26 -040098 }
99
Alec Mouri97326742022-11-04 01:32:24 +0000100 int32_t dataspace = ANativeWindow_getBuffersDataSpace(window);
101
102 // If the application is not updating the Surface themselves, e.g., another
103 // process is producing buffers for the application to display, then
104 // ANativeWindow_getBuffersDataSpace will return an unknown answer, so grab
105 // the dataspace from buffer metadata instead, if it exists.
106 if (dataspace == 0) {
107 dataspace = AHardwareBuffer_getDataSpace(sourceBuffer.get());
108 }
109
110 sk_sp<SkColorSpace> colorSpace =
111 DataSpaceToColorSpace(static_cast<android_dataspace>(dataspace));
John Reck2abc5492021-05-18 00:34:26 -0400112 sk_sp<SkImage> image =
Kevin Lubickdd8b2ea2023-03-17 19:55:58 +0000113 SkImages::DeferredFromAHardwareBuffer(sourceBuffer.get(), kPremul_SkAlphaType,
114 colorSpace);
John Reck2abc5492021-05-18 00:34:26 -0400115
116 if (!image.get()) {
John Reck4d73cb12022-07-27 10:32:52 -0400117 return request->onCopyFinished(CopyResult::UnknownError);
John Reck2abc5492021-05-18 00:34:26 -0400118 }
119
120 sk_sp<GrDirectContext> grContext = mRenderThread.requireGrContext();
121
John Reck4d73cb12022-07-27 10:32:52 -0400122 SkRect srcRect = request->srcRect.toSkRect();
John Reck2abc5492021-05-18 00:34:26 -0400123
Yiwei Zhang6cf96a52022-07-03 05:53:04 +0000124 SkRect imageSrcRect = SkRect::MakeIWH(description.width, description.height);
125 SkISize imageWH = SkISize::Make(description.width, description.height);
126 if (cropRect.left < cropRect.right && cropRect.top < cropRect.bottom) {
127 imageSrcRect =
128 SkRect::MakeLTRB(cropRect.left, cropRect.top, cropRect.right, cropRect.bottom);
129 imageWH = SkISize::Make(cropRect.right - cropRect.left, cropRect.bottom - cropRect.top);
130
131 // Chroma channels of YUV420 images are subsampled we may need to shrink the crop region by
132 // a whole texel on each side. Since skia still adds its own 0.5 inset, we apply an
133 // additional 0.5 inset. See GLConsumer::computeTransformMatrix for details.
134 float shrinkAmount = 0.0f;
135 switch (description.format) {
136 // Use HAL formats since some AHB formats are only available in vndk
137 case HAL_PIXEL_FORMAT_YCBCR_420_888:
138 case HAL_PIXEL_FORMAT_YV12:
139 case HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED:
140 shrinkAmount = 0.5f;
141 break;
142 default:
143 break;
144 }
145
146 // Shrink the crop if it has more than 1-px and differs from the buffer size.
147 if (imageWH.width() > 1 && imageWH.width() < (int32_t)description.width)
148 imageSrcRect = imageSrcRect.makeInset(shrinkAmount, 0);
149
150 if (imageWH.height() > 1 && imageWH.height() < (int32_t)description.height)
151 imageSrcRect = imageSrcRect.makeInset(0, shrinkAmount);
John Reck2abc5492021-05-18 00:34:26 -0400152 }
Yiwei Zhang6cf96a52022-07-03 05:53:04 +0000153
John Reck2abc5492021-05-18 00:34:26 -0400154 ALOGV("imageSrcRect = " RECT_STRING, SK_RECT_ARGS(imageSrcRect));
155
156 // Represents the "logical" width/height of the texture. That is, the dimensions of the buffer
157 // after respecting crop & rotate. flipV/flipH still result in the same width & height
158 // so we can ignore those for this.
159 const SkRect textureRect =
160 (windowTransform & NATIVE_WINDOW_TRANSFORM_ROT_90)
161 ? SkRect::MakeIWH(imageSrcRect.height(), imageSrcRect.width())
162 : SkRect::MakeIWH(imageSrcRect.width(), imageSrcRect.height());
163
164 if (srcRect.isEmpty()) {
165 srcRect = textureRect;
166 } else {
167 ALOGV("intersecting " RECT_STRING " with " RECT_STRING, SK_RECT_ARGS(srcRect),
168 SK_RECT_ARGS(textureRect));
169 if (!srcRect.intersect(textureRect)) {
John Reck4d73cb12022-07-27 10:32:52 -0400170 return request->onCopyFinished(CopyResult::UnknownError);
John Reck2abc5492021-05-18 00:34:26 -0400171 }
172 }
173
John Reck4d73cb12022-07-27 10:32:52 -0400174 SkBitmap skBitmap = request->getDestinationBitmap(srcRect.width(), srcRect.height());
175 SkBitmap* bitmap = &skBitmap;
John Reck2abc5492021-05-18 00:34:26 -0400176 sk_sp<SkSurface> tmpSurface =
Kevin Lubick6817fc42023-05-12 19:27:20 +0000177 SkSurfaces::RenderTarget(mRenderThread.getGrContext(), skgpu::Budgeted::kYes,
178 bitmap->info(), 0, kTopLeft_GrSurfaceOrigin, nullptr);
John Reck2abc5492021-05-18 00:34:26 -0400179
180 // if we can't generate a GPU surface that matches the destination bitmap (e.g. 565) then we
181 // attempt to do the intermediate rendering step in 8888
182 if (!tmpSurface.get()) {
183 SkImageInfo tmpInfo = bitmap->info().makeColorType(SkColorType::kN32_SkColorType);
Kevin Lubick6817fc42023-05-12 19:27:20 +0000184 tmpSurface = SkSurfaces::RenderTarget(mRenderThread.getGrContext(),
185 skgpu::Budgeted::kYes,
186 tmpInfo, 0, kTopLeft_GrSurfaceOrigin, nullptr);
John Reck2abc5492021-05-18 00:34:26 -0400187 if (!tmpSurface.get()) {
188 ALOGW("Unable to generate GPU buffer in a format compatible with the provided bitmap");
John Reck4d73cb12022-07-27 10:32:52 -0400189 return request->onCopyFinished(CopyResult::UnknownError);
John Reck2abc5492021-05-18 00:34:26 -0400190 }
191 }
192
193 /*
194 * The grand ordering of events.
195 * First we apply the buffer's crop, done by using a srcRect of the crop with a dstRect of the
196 * same width/height as the srcRect but with a 0x0 origin
197 *
198 * Second we apply the window transform via a Canvas matrix. Ordering for that is as follows:
199 * 1) FLIP_H
200 * 2) FLIP_V
201 * 3) ROT_90
202 * as per GLConsumer::computeTransformMatrix
203 *
204 * Third we apply the user's supplied cropping & scale to the output by doing a RectToRect
205 * matrix transform from srcRect to {0,0, bitmapWidth, bitmapHeight}
206 *
207 * Finally we're done messing with this bloody thing for hopefully the last time.
208 *
209 * That's a lie since...
210 * TODO: Do all this same stuff for TextureView as it's strictly more correct & easier
211 * to rationalize. And we can fix the 1-px crop bug.
212 */
213
214 SkMatrix m;
Yiwei Zhang6cf96a52022-07-03 05:53:04 +0000215 const SkRect imageDstRect = SkRect::Make(imageWH);
John Reck2abc5492021-05-18 00:34:26 -0400216 const float px = imageDstRect.centerX();
217 const float py = imageDstRect.centerY();
218 if (windowTransform & NATIVE_WINDOW_TRANSFORM_FLIP_H) {
219 m.postScale(-1.f, 1.f, px, py);
220 }
221 if (windowTransform & NATIVE_WINDOW_TRANSFORM_FLIP_V) {
222 m.postScale(1.f, -1.f, px, py);
223 }
224 if (windowTransform & NATIVE_WINDOW_TRANSFORM_ROT_90) {
225 m.postRotate(90, 0, 0);
226 m.postTranslate(imageDstRect.height(), 0);
227 }
228
229 SkSamplingOptions sampling(SkFilterMode::kNearest);
230 ALOGV("Mapping from " RECT_STRING " to " RECT_STRING, SK_RECT_ARGS(srcRect),
231 SK_RECT_ARGS(SkRect::MakeWH(bitmap->width(), bitmap->height())));
232 m.postConcat(SkMatrix::MakeRectToRect(srcRect,
233 SkRect::MakeWH(bitmap->width(), bitmap->height()),
234 SkMatrix::kFill_ScaleToFit));
235 if (srcRect.width() != bitmap->width() || srcRect.height() != bitmap->height()) {
236 sampling = SkSamplingOptions(SkFilterMode::kLinear);
237 }
238
239 SkCanvas* canvas = tmpSurface->getCanvas();
240 canvas->save();
241 canvas->concat(m);
242 SkPaint paint;
243 paint.setAlpha(255);
244 paint.setBlendMode(SkBlendMode::kSrc);
John Reck0f284da2021-07-14 14:24:51 -0400245 const bool hasBufferCrop = cropRect.left < cropRect.right && cropRect.top < cropRect.bottom;
246 auto constraint =
247 hasBufferCrop ? SkCanvas::kStrict_SrcRectConstraint : SkCanvas::kFast_SrcRectConstraint;
Alec Mouri97326742022-11-04 01:32:24 +0000248
249 static constexpr float kMaxLuminanceNits = 4000.f;
250 tonemapPaint(image->imageInfo(), canvas->imageInfo(), kMaxLuminanceNits, paint);
251
John Reck0f284da2021-07-14 14:24:51 -0400252 canvas->drawImageRect(image, imageSrcRect, imageDstRect, sampling, &paint, constraint);
John Reck2abc5492021-05-18 00:34:26 -0400253 canvas->restore();
254
255 if (!tmpSurface->readPixels(*bitmap, 0, 0)) {
256 // if we fail to readback from the GPU directly (e.g. 565) then we attempt to read into
257 // 8888 and then convert that into the destination format before giving up.
258 SkBitmap tmpBitmap;
259 SkImageInfo tmpInfo = bitmap->info().makeColorType(SkColorType::kN32_SkColorType);
260 if (bitmap->info().colorType() == SkColorType::kN32_SkColorType ||
261 !tmpBitmap.tryAllocPixels(tmpInfo) || !tmpSurface->readPixels(tmpBitmap, 0, 0) ||
262 !tmpBitmap.readPixels(bitmap->info(), bitmap->getPixels(), bitmap->rowBytes(), 0, 0)) {
263 ALOGW("Unable to convert content into the provided bitmap");
John Reck4d73cb12022-07-27 10:32:52 -0400264 return request->onCopyFinished(CopyResult::UnknownError);
John Reck2abc5492021-05-18 00:34:26 -0400265 }
266 }
267
268 bitmap->notifyPixelsChanged();
269
John Reck4d73cb12022-07-27 10:32:52 -0400270 return request->onCopyFinished(CopyResult::Success);
Stan Iliev1a025a72018-09-05 16:35:11 -0400271}
272
273CopyResult Readback::copyHWBitmapInto(Bitmap* hwBitmap, SkBitmap* bitmap) {
274 LOG_ALWAYS_FATAL_IF(!hwBitmap->isHardware());
275
276 Rect srcRect;
ramindani3952ed62021-08-12 15:55:12 +0000277 return copyImageInto(hwBitmap->makeImage(), srcRect, bitmap);
Stan Iliev1a025a72018-09-05 16:35:11 -0400278}
279
280CopyResult Readback::copyLayerInto(DeferredLayerUpdater* deferredLayer, SkBitmap* bitmap) {
John Reckfbeac3c2019-03-29 11:24:56 -0700281 ATRACE_CALL();
Stan Iliev1a025a72018-09-05 16:35:11 -0400282 if (!mRenderThread.getGrContext()) {
283 return CopyResult::UnknownError;
284 }
285
286 // acquire most recent buffer for drawing
287 deferredLayer->updateTexImage();
288 deferredLayer->apply();
289 const SkRect dstRect = SkRect::MakeIWH(bitmap->width(), bitmap->height());
290 CopyResult copyResult = CopyResult::UnknownError;
291 Layer* layer = deferredLayer->backingLayer();
292 if (layer) {
293 if (copyLayerInto(layer, nullptr, &dstRect, bitmap)) {
294 copyResult = CopyResult::Success;
295 }
296 }
297 return copyResult;
298}
299
John Reck76005182021-06-09 22:43:05 -0400300CopyResult Readback::copyImageInto(const sk_sp<SkImage>& image, SkBitmap* bitmap) {
301 Rect srcRect;
ramindani3952ed62021-08-12 15:55:12 +0000302 return copyImageInto(image, srcRect, bitmap);
John Reck76005182021-06-09 22:43:05 -0400303}
304
ramindani3952ed62021-08-12 15:55:12 +0000305CopyResult Readback::copyImageInto(const sk_sp<SkImage>& image, const Rect& srcRect,
306 SkBitmap* bitmap) {
John Reckfbeac3c2019-03-29 11:24:56 -0700307 ATRACE_CALL();
John Reck4d73cb12022-07-27 10:32:52 -0400308 if (!image.get()) {
309 return CopyResult::UnknownError;
310 }
Stan Iliev1a025a72018-09-05 16:35:11 -0400311 if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaGL) {
312 mRenderThread.requireGlContext();
313 } else {
Stan Iliev981afe72019-02-13 14:24:33 -0500314 mRenderThread.requireVkContext();
Stan Iliev1a025a72018-09-05 16:35:11 -0400315 }
Stan Iliev1a025a72018-09-05 16:35:11 -0400316 int imgWidth = image->width();
317 int imgHeight = image->height();
Adlai Hollerf8c434e2020-07-27 11:42:45 -0400318 sk_sp<GrDirectContext> grContext = sk_ref_sp(mRenderThread.getGrContext());
Stan Iliev1a025a72018-09-05 16:35:11 -0400319
Stan Iliev1a025a72018-09-05 16:35:11 -0400320 CopyResult copyResult = CopyResult::UnknownError;
321
322 int displayedWidth = imgWidth, displayedHeight = imgHeight;
Stan Iliev1a025a72018-09-05 16:35:11 -0400323 SkRect skiaDestRect = SkRect::MakeWH(bitmap->width(), bitmap->height());
324 SkRect skiaSrcRect = srcRect.toSkRect();
325 if (skiaSrcRect.isEmpty()) {
326 skiaSrcRect = SkRect::MakeIWH(displayedWidth, displayedHeight);
327 }
328 bool srcNotEmpty = skiaSrcRect.intersect(SkRect::MakeIWH(displayedWidth, displayedHeight));
329 if (!srcNotEmpty) {
330 return copyResult;
331 }
332
Derek Sollenbergerd01b5912018-10-19 15:55:33 -0400333 Layer layer(mRenderThread.renderState(), nullptr, 255, SkBlendMode::kSrc);
Stan Iliev1a025a72018-09-05 16:35:11 -0400334 layer.setSize(displayedWidth, displayedHeight);
Stan Iliev1a025a72018-09-05 16:35:11 -0400335 layer.setImage(image);
Kazuhiro Inabaa74d6372020-03-11 00:01:53 +0900336 // Scaling filter is not explicitly set here, because it is done inside copyLayerInfo
337 // after checking the necessity based on the src/dest rect size and the transformation.
Stan Iliev1a025a72018-09-05 16:35:11 -0400338 if (copyLayerInto(&layer, &skiaSrcRect, &skiaDestRect, bitmap)) {
339 copyResult = CopyResult::Success;
340 }
341
342 return copyResult;
343}
344
345bool Readback::copyLayerInto(Layer* layer, const SkRect* srcRect, const SkRect* dstRect,
346 SkBitmap* bitmap) {
Derek Sollenbergerefcbd6d2021-03-19 12:10:28 -0400347 /* This intermediate surface is present to work around limitations that LayerDrawable expects
348 * to render into a GPU backed canvas. Additionally, the offscreen buffer solution works around
349 * a scaling issue (b/62262733) that was encountered when sampling from an EGLImage into a
350 * software buffer.
Stan Iliev1a025a72018-09-05 16:35:11 -0400351 */
Kevin Lubick6817fc42023-05-12 19:27:20 +0000352 sk_sp<SkSurface> tmpSurface = SkSurfaces::RenderTarget(mRenderThread.getGrContext(),
353 skgpu::Budgeted::kYes,
354 bitmap->info(),
355 0,
356 kTopLeft_GrSurfaceOrigin, nullptr);
Stan Iliev1a025a72018-09-05 16:35:11 -0400357
Derek Sollenbergerd01b5912018-10-19 15:55:33 -0400358 // if we can't generate a GPU surface that matches the destination bitmap (e.g. 565) then we
359 // attempt to do the intermediate rendering step in 8888
Stan Iliev1a025a72018-09-05 16:35:11 -0400360 if (!tmpSurface.get()) {
Derek Sollenbergerd01b5912018-10-19 15:55:33 -0400361 SkImageInfo tmpInfo = bitmap->info().makeColorType(SkColorType::kN32_SkColorType);
Kevin Lubick6817fc42023-05-12 19:27:20 +0000362 tmpSurface = SkSurfaces::RenderTarget(mRenderThread.getGrContext(),
363 skgpu::Budgeted::kYes,
364 tmpInfo, 0, kTopLeft_GrSurfaceOrigin, nullptr);
Stan Iliev1a025a72018-09-05 16:35:11 -0400365 if (!tmpSurface.get()) {
Derek Sollenbergerd01b5912018-10-19 15:55:33 -0400366 ALOGW("Unable to generate GPU buffer in a format compatible with the provided bitmap");
Stan Iliev1a025a72018-09-05 16:35:11 -0400367 return false;
368 }
369 }
370
Derek Sollenbergerd01b5912018-10-19 15:55:33 -0400371 if (!skiapipeline::LayerDrawable::DrawLayer(mRenderThread.getGrContext(),
372 tmpSurface->getCanvas(), layer, srcRect, dstRect,
373 false)) {
374 ALOGW("Unable to draw content from GPU into the provided bitmap");
375 return false;
376 }
Stan Iliev1a025a72018-09-05 16:35:11 -0400377
Derek Sollenbergerd01b5912018-10-19 15:55:33 -0400378 if (!tmpSurface->readPixels(*bitmap, 0, 0)) {
379 // if we fail to readback from the GPU directly (e.g. 565) then we attempt to read into
380 // 8888 and then convert that into the destination format before giving up.
381 SkBitmap tmpBitmap;
382 SkImageInfo tmpInfo = bitmap->info().makeColorType(SkColorType::kN32_SkColorType);
383 if (bitmap->info().colorType() == SkColorType::kN32_SkColorType ||
384 !tmpBitmap.tryAllocPixels(tmpInfo) ||
385 !tmpSurface->readPixels(tmpBitmap, 0, 0) ||
386 !tmpBitmap.readPixels(bitmap->info(), bitmap->getPixels(),
387 bitmap->rowBytes(), 0, 0)) {
388 ALOGW("Unable to convert content into the provided bitmap");
389 return false;
Stan Iliev1a025a72018-09-05 16:35:11 -0400390 }
391 }
392
Derek Sollenbergerd01b5912018-10-19 15:55:33 -0400393 bitmap->notifyPixelsChanged();
394 return true;
Stan Iliev1a025a72018-09-05 16:35:11 -0400395}
396
397} /* namespace uirenderer */
398} /* namespace android */