| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 CC_TREES_PROXY_H_ | 5 #ifndef CC_TREES_PROXY_H_ |
| 6 #define CC_TREES_PROXY_H_ | 6 #define CC_TREES_PROXY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/threading/platform_thread.h" | 14 #include "base/threading/platform_thread.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "cc/base/cc_export.h" | 17 #include "cc/base/cc_export.h" |
| 18 | 18 |
| 19 namespace base { | 19 namespace base { |
| 20 namespace trace_event { | 20 namespace trace_event { |
| 21 class TracedValue; | 21 class TracedValue; |
| 22 } | 22 } |
| 23 | 23 class SingleThreadTaskRunner; |
| 24 // TODO(ssid): remove these aliases after the tracing clients are moved to the | |
| 25 // new trace_event namespace. See crbug.com/451032. ETA: March 2015 | |
| 26 namespace debug { | |
| 27 using ::base::trace_event::TracedValue; | |
| 28 } | 24 } |
| 29 class SingleThreadTaskRunner; | |
| 30 } // namespace base | |
| 31 | 25 |
| 32 namespace gfx { | 26 namespace gfx { |
| 33 class Rect; | 27 class Rect; |
| 34 class Vector2d; | 28 class Vector2d; |
| 35 } | 29 } |
| 36 | 30 |
| 37 namespace cc { | 31 namespace cc { |
| 38 class BlockingTaskRunner; | 32 class BlockingTaskRunner; |
| 39 class LayerTreeDebugState; | 33 class LayerTreeDebugState; |
| 40 class OutputSurface; | 34 class OutputSurface; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 55 #if DCHECK_IS_ON() | 49 #if DCHECK_IS_ON() |
| 56 void SetMainThreadBlocked(bool is_main_thread_blocked); | 50 void SetMainThreadBlocked(bool is_main_thread_blocked); |
| 57 void SetCurrentThreadIsImplThread(bool is_impl_thread); | 51 void SetCurrentThreadIsImplThread(bool is_impl_thread); |
| 58 #endif | 52 #endif |
| 59 | 53 |
| 60 virtual ~Proxy(); | 54 virtual ~Proxy(); |
| 61 | 55 |
| 62 virtual void FinishAllRendering() = 0; | 56 virtual void FinishAllRendering() = 0; |
| 63 | 57 |
| 64 virtual bool IsStarted() const = 0; | 58 virtual bool IsStarted() const = 0; |
| 59 virtual bool CommitToActiveTree() const = 0; |
| 65 | 60 |
| 66 // Will call LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted | 61 // Will call LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted |
| 67 // with the result of this function. | 62 // with the result of this function. |
| 68 virtual void SetOutputSurface(scoped_ptr<OutputSurface> output_surface) = 0; | 63 virtual void SetOutputSurface(scoped_ptr<OutputSurface> output_surface) = 0; |
| 69 | 64 |
| 70 // Indicates that the compositing surface associated with our context is | 65 // Indicates that the compositing surface associated with our context is |
| 71 // ready to use. | 66 // ready to use. |
| 72 virtual void SetLayerTreeHostClientReady() = 0; | 67 virtual void SetLayerTreeHostClientReady() = 0; |
| 73 | 68 |
| 74 virtual void SetVisible(bool visible) = 0; | 69 virtual void SetVisible(bool visible) = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 101 | 96 |
| 102 // Forces 3D commands on all contexts to wait for all previous SwapBuffers | 97 // Forces 3D commands on all contexts to wait for all previous SwapBuffers |
| 103 // to finish before executing in the GPU process. | 98 // to finish before executing in the GPU process. |
| 104 virtual void ForceSerializeOnSwapBuffers() = 0; | 99 virtual void ForceSerializeOnSwapBuffers() = 0; |
| 105 | 100 |
| 106 // Maximum number of sub-region texture updates supported for each commit. | 101 // Maximum number of sub-region texture updates supported for each commit. |
| 107 virtual size_t MaxPartialTextureUpdates() const = 0; | 102 virtual size_t MaxPartialTextureUpdates() const = 0; |
| 108 | 103 |
| 109 virtual bool SupportsImplScrolling() const = 0; | 104 virtual bool SupportsImplScrolling() const = 0; |
| 110 | 105 |
| 111 virtual void AsValueInto(base::debug::TracedValue* value) const = 0; | 106 virtual void AsValueInto(base::trace_event::TracedValue* value) const = 0; |
| 112 | 107 |
| 113 virtual void SetDebugState(const LayerTreeDebugState& debug_state) = 0; | 108 virtual void SetDebugState(const LayerTreeDebugState& debug_state) = 0; |
| 114 | 109 |
| 115 virtual void SetChildrenNeedBeginFrames(bool children_need_begin_frames) = 0; | 110 virtual void SetChildrenNeedBeginFrames(bool children_need_begin_frames) = 0; |
| 116 | 111 |
| 117 // Testing hooks | 112 // Testing hooks |
| 118 virtual bool MainFrameWillHappenForTesting() = 0; | 113 virtual bool MainFrameWillHappenForTesting() = 0; |
| 119 | 114 |
| 120 BlockingTaskRunner* blocking_main_thread_task_runner() const { | 115 BlockingTaskRunner* blocking_main_thread_task_runner() const { |
| 121 return blocking_main_thread_task_runner_.get(); | 116 return blocking_main_thread_task_runner_.get(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} | 158 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} |
| 164 ~DebugScopedSetMainThreadBlocked() {} | 159 ~DebugScopedSetMainThreadBlocked() {} |
| 165 private: | 160 private: |
| 166 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); | 161 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); |
| 167 }; | 162 }; |
| 168 #endif | 163 #endif |
| 169 | 164 |
| 170 } // namespace cc | 165 } // namespace cc |
| 171 | 166 |
| 172 #endif // CC_TREES_PROXY_H_ | 167 #endif // CC_TREES_PROXY_H_ |
| OLD | NEW |