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

Unified Diff: src/core/SkCanvas.cpp

Issue 197123003: Proposed SkCanvas API for preLoading textures to VRAM v2.0 (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: retry upload Created 6 years, 9 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 | « include/gpu/SkGpuDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
===================================================================
--- src/core/SkCanvas.cpp (revision 13812)
+++ src/core/SkCanvas.cpp (working copy)
@@ -2461,8 +2461,23 @@
}
///////////////////////////////////////////////////////////////////////////////
+void SkCanvas::EXPERIMENTAL_optimize(SkPicture* picture) {
+ SkBaseDevice* device = this->getDevice();
+ if (NULL != device) {
+ device->EXPERIMENTAL_optimize(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)) {
+ return; // the device has rendered the entire picture
+ }
+ }
+
picture.draw(this);
}
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698