| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 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/threading/platform_thread.h" | 13 #include "base/threading/platform_thread.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "cc/base/cc_export.h" | 16 #include "cc/base/cc_export.h" |
| 17 #include "cc/input/top_controls_state.h" | 17 #include "cc/input/top_controls_state.h" |
| 18 #include "cc/scheduler/begin_frame_source.h" | 18 #include "cc/scheduler/begin_frame_source.h" |
| 19 #include "cc/trees/task_runner_provider.h" | 19 #include "cc/trees/task_runner_provider.h" |
| 20 | 20 |
| 21 namespace gfx { | 21 namespace gfx { |
| 22 class Rect; | 22 class Rect; |
| 23 class Vector2d; | 23 class Vector2d; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace cc { | 26 namespace cc { |
| 27 class BeginFrameSource; | 27 class BeginFrameSource; |
| 28 class LayerTreeDebugState; | 28 class LayerTreeDebugState; |
| 29 class LayerTreeMutator; |
| 29 class OutputSurface; | 30 class OutputSurface; |
| 30 struct RendererCapabilities; | 31 struct RendererCapabilities; |
| 31 | 32 |
| 32 // Abstract interface responsible for proxying commands from the main-thread | 33 // Abstract interface responsible for proxying commands from the main-thread |
| 33 // side of the compositor over to the compositor implementation. | 34 // side of the compositor over to the compositor implementation. |
| 34 class CC_EXPORT Proxy { | 35 class CC_EXPORT Proxy { |
| 35 public: | 36 public: |
| 36 virtual ~Proxy() {} | 37 virtual ~Proxy() {} |
| 37 | 38 |
| 38 virtual void FinishAllRendering() = 0; | 39 virtual void FinishAllRendering() = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 65 virtual void MainThreadHasStoppedFlinging() = 0; | 66 virtual void MainThreadHasStoppedFlinging() = 0; |
| 66 | 67 |
| 67 virtual bool CommitRequested() const = 0; | 68 virtual bool CommitRequested() const = 0; |
| 68 virtual bool BeginMainFrameRequested() const = 0; | 69 virtual bool BeginMainFrameRequested() const = 0; |
| 69 | 70 |
| 70 // Must be called before using the proxy. | 71 // Must be called before using the proxy. |
| 71 virtual void Start( | 72 virtual void Start( |
| 72 std::unique_ptr<BeginFrameSource> external_begin_frame_source) = 0; | 73 std::unique_ptr<BeginFrameSource> external_begin_frame_source) = 0; |
| 73 virtual void Stop() = 0; // Must be called before deleting the proxy. | 74 virtual void Stop() = 0; // Must be called before deleting the proxy. |
| 74 | 75 |
| 76 virtual void SetMutator(std::unique_ptr<LayerTreeMutator> mutator) = 0; |
| 77 |
| 75 virtual bool SupportsImplScrolling() const = 0; | 78 virtual bool SupportsImplScrolling() const = 0; |
| 76 | 79 |
| 77 virtual void UpdateTopControlsState(TopControlsState constraints, | 80 virtual void UpdateTopControlsState(TopControlsState constraints, |
| 78 TopControlsState current, | 81 TopControlsState current, |
| 79 bool animate) = 0; | 82 bool animate) = 0; |
| 80 | 83 |
| 81 // Testing hooks | 84 // Testing hooks |
| 82 virtual bool MainFrameWillHappenForTesting() = 0; | 85 virtual bool MainFrameWillHappenForTesting() = 0; |
| 83 }; | 86 }; |
| 84 | 87 |
| 85 } // namespace cc | 88 } // namespace cc |
| 86 | 89 |
| 87 #endif // CC_TREES_PROXY_H_ | 90 #endif // CC_TREES_PROXY_H_ |
| OLD | NEW |