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 "gpu/command_buffer/service/in_process_command_buffer.h" | 10 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 virtual bool DemandDrawSw(SkCanvas* canvas) = 0; | 80 virtual bool DemandDrawSw(SkCanvas* canvas) = 0; |
81 | 81 |
82 // Set the memory limit policy of this compositor. | 82 // Set the memory limit policy of this compositor. |
83 virtual void SetMemoryPolicy(size_t bytes_limit) = 0; | 83 virtual void SetMemoryPolicy(size_t bytes_limit) = 0; |
84 | 84 |
85 // Should be called by the embedder after the embedder had modified the | 85 // Should be called by the embedder after the embedder had modified the |
86 // scroll offset of the root layer (as returned by | 86 // scroll offset of the root layer (as returned by |
87 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset). | 87 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset). |
88 virtual void DidChangeRootLayerScrollOffset() = 0; | 88 virtual void DidChangeRootLayerScrollOffset() = 0; |
89 | 89 |
| 90 // Called by the embedder to notify that the compositor is active. The |
| 91 // compositor won't ask for vsyncs when it's inactive. NOTE: The compositor |
| 92 // starts off as inactive and needs a SetActive(true) call to begin. |
| 93 virtual void SetIsActive(bool is_active) = 0; |
| 94 |
90 protected: | 95 protected: |
91 virtual ~SynchronousCompositor() {} | 96 virtual ~SynchronousCompositor() {} |
92 }; | 97 }; |
93 | 98 |
94 } // namespace content | 99 } // namespace content |
95 | 100 |
96 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 101 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
OLD | NEW |