summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobertphillips@google.com <robertphillips@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-05 16:35:39 +0000
committerrobertphillips@google.com <robertphillips@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-05 16:35:39 +0000
commit4f856b37620a6950793761f4587abd5b50205114 (patch)
tree87cfdd8e10972dfbcc1ac59fd46cf6ad375e82c9
parent19c4c668950c49fa3b81c2eaa6bdbbda4ee21791 (diff)
downloadchromium_src-4f856b37620a6950793761f4587abd5b50205114.zip
chromium_src-4f856b37620a6950793761f4587abd5b50205114.tar.gz
chromium_src-4f856b37620a6950793761f4587abd5b50205114.tar.bz2
Switch Chromium to new Skia SkCanvas::drawPicture method
As of Skia 9b14f26d (Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer) - https://codereview.chromium.org/313613004) SkCanvas::drawPicture has an alternate signature. The old entry point is deprecated. Note: this patch cannot be landed until the corresponding Skia change is rolled into Chromium & Blink. enne: cc fmalita: skia Review URL: https://codereview.chromium.org/315963003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275155 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--cc/resources/skpicture_content_layer_updater.cc2
-rw-r--r--skia/ext/benchmarking_canvas.cc10
-rw-r--r--skia/ext/pixel_ref_utils.cc2
3 files changed, 7 insertions, 7 deletions
diff --git a/cc/resources/skpicture_content_layer_updater.cc b/cc/resources/skpicture_content_layer_updater.cc
index 0f9f22e..eb12385 100644
--- a/cc/resources/skpicture_content_layer_updater.cc
+++ b/cc/resources/skpicture_content_layer_updater.cc
@@ -50,7 +50,7 @@ void SkPictureContentLayerUpdater::PrepareToUpdate(
void SkPictureContentLayerUpdater::DrawPicture(SkCanvas* canvas) {
TRACE_EVENT0("cc", "SkPictureContentLayerUpdater::DrawPicture");
if (picture_)
- canvas->drawPicture(*picture_);
+ canvas->drawPicture(picture_.get());
}
} // namespace cc
diff --git a/skia/ext/benchmarking_canvas.cc b/skia/ext/benchmarking_canvas.cc
index f765cd1..fd5e574 100644
--- a/skia/ext/benchmarking_canvas.cc
+++ b/skia/ext/benchmarking_canvas.cc
@@ -114,11 +114,6 @@ public:
SkProxyCanvas::drawSprite(bitmap, left, top, paint);
}
- virtual void drawPicture(SkPicture& picture) OVERRIDE {
- AutoStamper stamper(this);
- SkProxyCanvas::drawPicture(picture);
- }
-
virtual void drawVertices(VertexMode vmode, int vertexCount,
const SkPoint vertices[], const SkPoint texs[],
const SkColor colors[], SkXfermode* xmode,
@@ -186,6 +181,11 @@ protected:
SkProxyCanvas::onClipRegion(region, op);
}
+ virtual void onDrawPicture(const SkPicture* picture) OVERRIDE {
+ AutoStamper stamper(this);
+ SkProxyCanvas::onDrawPicture(picture);
+ }
+
private:
typedef base::hash_map<size_t, base::TimeDelta> TimingsMap;
TimingsMap timings_map_;
diff --git a/skia/ext/pixel_ref_utils.cc b/skia/ext/pixel_ref_utils.cc
index 69fa405..4ff7539 100644
--- a/skia/ext/pixel_ref_utils.cc
+++ b/skia/ext/pixel_ref_utils.cc
@@ -370,7 +370,7 @@ void PixelRefUtils::GatherDiscardablePixelRefs(
canvas.clipRect(SkRect::MakeWH(picture->width(), picture->height()),
SkRegion::kIntersect_Op,
false);
- canvas.drawPicture(*picture);
+ canvas.drawPicture(picture);
}
} // namespace skia