diff options
author | 2014-04-11 15:54:14 +0000 | |
---|---|---|
committer | 2014-04-11 15:54:14 +0000 | |
commit | c873329ae9ff00b0c45f7294172ad2e9b1ec44c8 (patch) | |
tree | 097af473a93308c68cf5aebaebf51abd1722034b /src/core/SkCanvas.cpp | |
parent | 0bd03cf38cc61ab78c09eb83f4564e34a3d7415f (diff) |
Update bench to be able to preprocess skps
This allows benchmarking of optimization improvements and plumbs in the purging API. The purging is necessary so we don't magically get faster because the saveLayers are always pre-generated.
R=jvanverth@google.com, reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/233663002
git-svn-id: http://skia.googlecode.com/svn/trunk@14154 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkCanvas.cpp')
-rw-r--r-- | src/core/SkCanvas.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index c16ac9a09f..8d35eaedf9 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -2542,12 +2542,19 @@ void SkCanvas::EXPERIMENTAL_optimize(SkPicture* picture) { } } +void SkCanvas::EXPERIMENTAL_purge(SkPicture* picture) { + SkBaseDevice* device = this->getTopDevice(); + if (NULL != device) { + device->EXPERIMENTAL_purge(picture); + } +} + void SkCanvas::drawPicture(SkPicture& picture) { SkBaseDevice* device = this->getTopDevice(); if (NULL != device) { // Canvas has to first give the device the opportunity to render // the picture itself. - if (device->EXPERIMENTAL_drawPicture(&picture)) { + if (device->EXPERIMENTAL_drawPicture(this, &picture)) { return; // the device has rendered the entire picture } } |