Index: cc/resources/content_layer_updater.cc |
diff --git a/cc/resources/content_layer_updater.cc b/cc/resources/content_layer_updater.cc |
index 92cabf2c66da9175da7cde477688eb4e353224e1..e3f87a4c272a08aca0278226cd83c74294c52c5c 100644 |
--- a/cc/resources/content_layer_updater.cc |
+++ b/cc/resources/content_layer_updater.cc |
@@ -62,12 +62,14 @@ void ContentLayerUpdater::PaintContents(SkCanvas* canvas, |
SkRect layer_sk_rect = SkRect::MakeXYWH( |
layer_rect.x(), layer_rect.y(), layer_rect.width(), layer_rect.height()); |
+ canvas->clipRect(layer_sk_rect); |
+ |
// If the layer has opaque contents then there is no need to |
// clear the canvas before painting. |
- if (!layer_is_opaque_) |
- canvas->clear(SK_ColorTRANSPARENT); |
- |
- canvas->clipRect(layer_sk_rect); |
+ if (!layer_is_opaque_) { |
+ TRACE_EVENT0("cc", "Clear"); |
+ canvas->drawColor(SK_ColorTRANSPARENT, SkXfermode::kSrc_Mode); |
+ } |
gfx::RectF opaque_layer_rect; |
painter_->Paint(canvas, layer_rect, &opaque_layer_rect); |