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

Unified Diff: cc/resources/picture.cc

Issue 14322017: Revert "cc: Move canvas clear from picture to picture_pile_impl" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert Created 7 years, 7 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 | « no previous file | cc/resources/picture_pile_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index 159885d994b6aa42e01bafce6ea5d630316cd81f..20b517532e807feae401e7e9f6b2e32fda9d22ee 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -198,6 +198,16 @@ void Picture::Record(ContentLayerClient* painter,
canvas->translate(SkFloatToScalar(-layer_rect_.x()),
SkFloatToScalar(-layer_rect_.y()));
+ SkPaint paint;
+ paint.setAntiAlias(false);
+ paint.setXfermodeMode(SkXfermode::kClear_Mode);
+ SkRect layer_skrect = SkRect::MakeXYWH(layer_rect_.x(),
+ layer_rect_.y(),
+ layer_rect_.width(),
+ layer_rect_.height());
+ canvas->clipRect(layer_skrect);
+ canvas->drawRect(layer_skrect, paint);
+
gfx::RectF opaque_layer_rect;
base::TimeTicks begin_record_time;
if (stats)
« no previous file with comments | « no previous file | cc/resources/picture_pile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698