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

Unified Diff: src/gpu/GrRecordReplaceDraw.cpp

Issue 790643009: Revert of Fix layer hoisting image filter corner cases (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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') | tests/GpuLayerCacheTest.cpp » ('j') | 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 0ceea3721fb806fdca40c437f39b1ca677613cbf..852c51f4180dd155d9ad1c527d0ed9dc4111c960 100644
--- a/src/gpu/GrRecordReplaceDraw.cpp
+++ b/src/gpu/GrRecordReplaceDraw.cpp
@@ -21,6 +21,8 @@
}
static inline void draw_replacement_bitmap(GrCachedLayer* layer, SkCanvas* canvas) {
+ const SkRect src = SkRect::Make(layer->rect());
+ const SkRect dst = SkRect::Make(layer->bound());
SkBitmap bm;
wrap_texture(layer->texture(),
@@ -28,22 +30,10 @@
!layer->isAtlased() ? layer->rect().height() : layer->texture()->height(),
&bm);
- if (layer->isAtlased()) {
- const SkRect src = SkRect::Make(layer->rect());
- const SkRect dst = SkRect::Make(layer->srcIR());
-
- SkASSERT(layer->offset().isZero());
-
- canvas->save();
- canvas->setMatrix(SkMatrix::I());
- canvas->drawBitmapRectToRect(bm, &src, dst, layer->paint());
- canvas->restore();
- } else {
- canvas->drawSprite(bm,
- layer->srcIR().fLeft + layer->offset().fX,
- layer->srcIR().fTop + layer->offset().fY,
- layer->paint());
- }
+ canvas->save();
+ canvas->setMatrix(SkMatrix::I());
+ canvas->drawBitmapRectToRect(bm, &src, dst, layer->paint());
+ canvas->restore();
}
// Used by GrRecordReplaceDraw. It intercepts nested drawPicture calls and
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | tests/GpuLayerCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698