summaryrefslogtreecommitdiffstats
path: root/content/public/browser/android/synchronous_compositor.h
diff options
context:
space:
mode:
Diffstat (limited to 'content/public/browser/android/synchronous_compositor.h')
-rw-r--r--content/public/browser/android/synchronous_compositor.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/content/public/browser/android/synchronous_compositor.h b/content/public/browser/android/synchronous_compositor.h
index 810daf2..45b01eb 100644
--- a/content/public/browser/android/synchronous_compositor.h
+++ b/content/public/browser/android/synchronous_compositor.h
@@ -23,6 +23,16 @@ class WebContents;
class SynchronousCompositorClient;
+struct CONTENT_EXPORT SynchronousCompositorMemoryPolicy {
+ // Memory limit for rendering and pre-rendering.
+ size_t bytes_limit;
+
+ // Limit of number of GL resources used for rendering and pre-rendering.
+ size_t num_resources_limit;
+
+ SynchronousCompositorMemoryPolicy();
+};
+
// Interface for embedders that wish to direct compositing operations
// synchronously under their own control. Only meaningful when the
// kEnableSyncrhonousRendererCompositor flag is specified.
@@ -65,6 +75,10 @@ class CONTENT_EXPORT SynchronousCompositor {
// and clip set there-in).
virtual bool DemandDrawSw(SkCanvas* canvas) = 0;
+ // Set the memory limit policy of this compositor.
+ virtual void SetMemoryPolicy(
+ const SynchronousCompositorMemoryPolicy& policy) = 0;
+
// Should be called by the embedder after the embedder had modified the
// scroll offset of the root layer (as returned by
// SynchronousCompositorClient::GetTotalRootLayerScrollOffset).