aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/config/SkUserConfig.h8
-rw-r--r--include/utils/SkDeferredCanvas.h6
2 files changed, 14 insertions, 0 deletions
diff --git a/include/config/SkUserConfig.h b/include/config/SkUserConfig.h
index 79fdc7a2a4..ae5865ab37 100644
--- a/include/config/SkUserConfig.h
+++ b/include/config/SkUserConfig.h
@@ -199,4 +199,12 @@
backend. Defaults to 1 (build the GPU code).
*/
//#define SK_SUPPORT_GPU 1
+
+/* Defines the maximum size allowed for a given image to be rendered using the
+ deferred canvas. If the image is larger than this threshold, the image
+ is considered too large and the copy done by the deferred canvas too
+ expensive, so an image of that size would instead be drawn immediately.
+*/
+//#define SK_DEFERRED_CANVAS_BITMAP_SIZE_THRESHOLD 1048576
+
#endif
diff --git a/include/utils/SkDeferredCanvas.h b/include/utils/SkDeferredCanvas.h
index 97848f1129..4686d000b9 100644
--- a/include/utils/SkDeferredCanvas.h
+++ b/include/utils/SkDeferredCanvas.h
@@ -116,6 +116,12 @@ public:
size_t freeMemoryIfPossible(size_t bytesToFree);
/**
+ * Specifies the maximum size (in bytes) allowed for a given image to be
+ * rendered using the deferred canvas.
+ */
+ void setBitmapSizeThreshold(size_t sizeThreshold);
+
+ /**
* Executes all pending commands without drawing
*/
void silentFlush();