Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: src/gpu/GrRecordReplaceDraw.cpp

Issue 842323003: Switch to a more complete method of filtering hoisted layers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix oversight w.r.t. SkPictureImageFilters Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrRecordReplaceDraw.cpp
diff --git a/src/gpu/GrRecordReplaceDraw.cpp b/src/gpu/GrRecordReplaceDraw.cpp
index 234f92f24f9ae6d0cd1f3fe54b1a23ce8ff6816f..dacc939e62693cb4d64f4f93b2347a74b090c590 100644
--- a/src/gpu/GrRecordReplaceDraw.cpp
+++ b/src/gpu/GrRecordReplaceDraw.cpp
@@ -22,6 +22,12 @@ static inline void wrap_texture(GrTexture* texture, int width, int height, SkBit
static inline void draw_replacement_bitmap(GrCachedLayer* layer, SkCanvas* canvas) {
+ // Some image filter can totally filter away a layer (e.g., SkPictureImageFilter's with
+ // no picture).
+ if (!layer->texture()) {
+ return;
+ }
+
SkBitmap bm;
wrap_texture(layer->texture(),
!layer->isAtlased() ? layer->rect().width() : layer->texture()->width(),
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698