diff options
author | Nathaniel Nifong <nifong@google.com> | 2019-09-17 12:52:52 -0400 |
---|---|---|
committer | Nathaniel Nifong <nifong@google.com> | 2019-09-19 11:34:48 -0400 |
commit | fe05b7c7ca0739a8abeb05843aa113e31c2af357 (patch) | |
tree | 4dd46492ec881d277f3abc11666e18ba0a2bc44e /libs/hwui/pipeline/skia/SkiaPipeline.cpp | |
parent | 890ccb94ca4287e6da240e5c22d5c3ac05153e38 (diff) |
Check for null surface pointer in renderOverdraw
Bug: 141160420
Test: built
Change-Id: I5d6d4fc11f95f27ab6aa31377d3b94e71f14dca4
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaPipeline.cpp')
-rw-r--r-- | libs/hwui/pipeline/skia/SkiaPipeline.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.cpp b/libs/hwui/pipeline/skia/SkiaPipeline.cpp index 67c181b452bb..3010206cdc5b 100644 --- a/libs/hwui/pipeline/skia/SkiaPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaPipeline.cpp @@ -569,6 +569,7 @@ void SkiaPipeline::renderOverdraw(const LayerUpdateQueue& layers, const SkRect& // Set up the overdraw canvas. SkImageInfo offscreenInfo = SkImageInfo::MakeA8(surface->width(), surface->height()); sk_sp<SkSurface> offscreen = surface->makeSurface(offscreenInfo); + LOG_ALWAYS_FATAL_IF(!offscreen, "Failed to create offscreen SkSurface for overdraw viz."); SkOverdrawCanvas overdrawCanvas(offscreen->getCanvas()); // Fake a redraw to replay the draw commands. This will increment the alpha channel |