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

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: Attempt to dissuage the adventurous from trying the new interface (for real this time) 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
Index: src/core/SkCanvas.cpp
===================================================================
--- src/core/SkCanvas.cpp (revision 13762)
+++ src/core/SkCanvas.cpp (working copy)
@@ -2404,8 +2404,14 @@
}
///////////////////////////////////////////////////////////////////////////////
+void SkCanvas::drawPicture(SkPicture& picture) {
+ SkBaseDevice* device = this->getDevice();
+ if (NULL != device) {
+ if (device->EXPERIMENTAL_optimizedRender(picture)) {
+ return; // the device has rendered the entire picture
+ }
+ }
-void SkCanvas::drawPicture(SkPicture& picture) {
picture.draw(this);
}
« include/core/SkPicture.h ('K') | « include/gpu/SkGpuDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698