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

Side by Side Diff: content/public/browser/android/synchronous_compositor.h

Issue 25082006: [Android WebView] OnMemoryPressure to drop tile memory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use level Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 13 matching lines...) Expand all
24 class SynchronousCompositorClient; 24 class SynchronousCompositorClient;
25 25
26 struct CONTENT_EXPORT SynchronousCompositorMemoryPolicy { 26 struct CONTENT_EXPORT SynchronousCompositorMemoryPolicy {
27 // Memory limit for rendering and pre-rendering. 27 // Memory limit for rendering and pre-rendering.
28 size_t bytes_limit; 28 size_t bytes_limit;
29 29
30 // Limit of number of GL resources used for rendering and pre-rendering. 30 // Limit of number of GL resources used for rendering and pre-rendering.
31 size_t num_resources_limit; 31 size_t num_resources_limit;
32 32
33 SynchronousCompositorMemoryPolicy(); 33 SynchronousCompositorMemoryPolicy();
34
35 bool operator==(const SynchronousCompositorMemoryPolicy& other) const;
36 bool operator!=(const SynchronousCompositorMemoryPolicy& other) const;
34 }; 37 };
35 38
36 // Interface for embedders that wish to direct compositing operations 39 // Interface for embedders that wish to direct compositing operations
37 // synchronously under their own control. Only meaningful when the 40 // synchronously under their own control. Only meaningful when the
38 // kEnableSyncrhonousRendererCompositor flag is specified. 41 // kEnableSyncrhonousRendererCompositor flag is specified.
39 class CONTENT_EXPORT SynchronousCompositor { 42 class CONTENT_EXPORT SynchronousCompositor {
40 public: 43 public:
41 // Must be called once per WebContents instance. Will create the compositor 44 // Must be called once per WebContents instance. Will create the compositor
42 // instance as needed, but only if |client| is non-NULL. 45 // instance as needed, but only if |client| is non-NULL.
43 static void SetClientForWebContents(WebContents* contents, 46 static void SetClientForWebContents(WebContents* contents,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset). 87 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset).
85 virtual void DidChangeRootLayerScrollOffset() = 0; 88 virtual void DidChangeRootLayerScrollOffset() = 0;
86 89
87 protected: 90 protected:
88 virtual ~SynchronousCompositor() {} 91 virtual ~SynchronousCompositor() {}
89 }; 92 };
90 93
91 } // namespace content 94 } // namespace content
92 95
93 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ 96 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698