summaryrefslogtreecommitdiffstats
path: root/chromium/cc/layers/picture_image_layer.cc
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-08 14:30:41 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-12 13:49:54 +0200
commitab0a50979b9eb4dfa3320eff7e187e41efedf7a9 (patch)
tree498dfb8a97ff3361a9f7486863a52bb4e26bb898 /chromium/cc/layers/picture_image_layer.cc
parent4ce69f7403811819800e7c5ae1318b2647e778d1 (diff)
Update Chromium to beta version 37.0.2062.68
Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'chromium/cc/layers/picture_image_layer.cc')
-rw-r--r--chromium/cc/layers/picture_image_layer.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/chromium/cc/layers/picture_image_layer.cc b/chromium/cc/layers/picture_image_layer.cc
index 03e3a9e0157..a65ac8c9318 100644
--- a/chromium/cc/layers/picture_image_layer.cc
+++ b/chromium/cc/layers/picture_image_layer.cc
@@ -40,9 +40,11 @@ void PictureImageLayer::SetBitmap(const SkBitmap& bitmap) {
SetNeedsDisplay();
}
-void PictureImageLayer::PaintContents(SkCanvas* canvas,
- gfx::Rect clip,
- gfx::RectF* opaque) {
+void PictureImageLayer::PaintContents(
+ SkCanvas* canvas,
+ const gfx::Rect& clip,
+ gfx::RectF* opaque,
+ ContentLayerClient::GraphicsContextStatus gc_status) {
if (!bitmap_.width() || !bitmap_.height())
return;
@@ -52,7 +54,17 @@ void PictureImageLayer::PaintContents(SkCanvas* canvas,
SkFloatToScalar(static_cast<float>(bounds().height()) / bitmap_.height());
canvas->scale(content_to_layer_scale_x, content_to_layer_scale_y);
- canvas->drawBitmap(bitmap_, 0, 0);
+ // Because PictureImageLayer always FillsBoundsCompletely it will not clear
+ // before painting on playback. As a result we must configure the paint to
+ // copy over the uncleared destination, rather than blending with it.
+ SkPaint paint;
+ paint.setXfermodeMode(SkXfermode::kSrc_Mode);
+ canvas->drawBitmap(bitmap_, 0, 0, &paint);
+}
+
+bool PictureImageLayer::FillsBoundsCompletely() const {
+ // PictureImageLayer will always paint to the entire layer bounds.
+ return true;
}
} // namespace cc