| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |