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

Unified Diff: cc/resources/picture.cc

Issue 16667017: Revert 198272 "cc: Move canvas clear from picture to picture_pil..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 years, 6 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
===================================================================
--- cc/resources/picture.cc (revision 205297)
+++ cc/resources/picture.cc (working copy)
@@ -198,6 +198,16 @@
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