| 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_SINGLE_THREAD_PROXY_H_ | 5 #ifndef CC_TREES_SINGLE_THREAD_PROXY_H_ |
| 6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ | 6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ |
| 7 | 7 |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE; | 39 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE; |
| 40 virtual void Stop() OVERRIDE; | 40 virtual void Stop() OVERRIDE; |
| 41 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; | 41 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; |
| 42 virtual void AcquireLayerTextures() OVERRIDE {} | 42 virtual void AcquireLayerTextures() OVERRIDE {} |
| 43 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; | 43 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; |
| 44 virtual skia::RefPtr<SkPicture> CapturePicture() OVERRIDE; | 44 virtual skia::RefPtr<SkPicture> CapturePicture() OVERRIDE; |
| 45 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; | 45 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; |
| 46 virtual bool CommitPendingForTesting() OVERRIDE; | 46 virtual bool CommitPendingForTesting() OVERRIDE; |
| 47 | 47 |
| 48 // LayerTreeHostImplClient implementation | 48 // LayerTreeHostImplClient implementation |
| 49 virtual void DidUpdateCapabilitiesOnImplThread( |
| 50 bool success, |
| 51 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; |
| 49 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; | 52 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; |
| 50 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE {} | 53 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE {} |
| 51 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, | 54 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
| 52 base::TimeDelta interval) OVERRIDE {} | 55 base::TimeDelta interval) OVERRIDE {} |
| 53 virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) | 56 virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) |
| 54 OVERRIDE {} | 57 OVERRIDE {} |
| 55 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; | 58 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; |
| 56 virtual void OnHasPendingTreeStateChanged(bool have_pending_tree) OVERRIDE; | 59 virtual void OnHasPendingTreeStateChanged(bool have_pending_tree) OVERRIDE; |
| 57 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; | 60 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; |
| 58 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect dirty_rect) OVERRIDE; | 61 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect dirty_rect) OVERRIDE; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 bool ShouldComposite() const; | 101 bool ShouldComposite() const; |
| 99 | 102 |
| 100 // Accessed on main thread only. | 103 // Accessed on main thread only. |
| 101 LayerTreeHost* layer_tree_host_; | 104 LayerTreeHost* layer_tree_host_; |
| 102 bool created_offscreen_context_provider_; | 105 bool created_offscreen_context_provider_; |
| 103 | 106 |
| 104 // Holds the first output surface passed from Start. Should not be used for | 107 // Holds the first output surface passed from Start. Should not be used for |
| 105 // anything else. | 108 // anything else. |
| 106 scoped_ptr<OutputSurface> first_output_surface_; | 109 scoped_ptr<OutputSurface> first_output_surface_; |
| 107 | 110 |
| 111 bool initializing_new_output_surface_; |
| 112 |
| 108 // Used on the Thread, but checked on main thread during | 113 // Used on the Thread, but checked on main thread during |
| 109 // initialization/shutdown. | 114 // initialization/shutdown. |
| 110 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 115 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
| 111 RendererCapabilities renderer_capabilities_for_main_thread_; | 116 RendererCapabilities renderer_capabilities_for_main_thread_; |
| 112 | 117 |
| 113 bool next_frame_is_newly_committed_frame_; | 118 bool next_frame_is_newly_committed_frame_; |
| 114 | 119 |
| 115 bool inside_draw_; | 120 bool inside_draw_; |
| 116 | 121 |
| 117 DISALLOW_COPY_AND_ASSIGN(SingleThreadProxy); | 122 DISALLOW_COPY_AND_ASSIGN(SingleThreadProxy); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 private: | 179 private: |
| 175 DebugScopedSetImplThread impl_thread_; | 180 DebugScopedSetImplThread impl_thread_; |
| 176 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 181 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
| 177 | 182 |
| 178 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 183 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
| 179 }; | 184 }; |
| 180 | 185 |
| 181 } // namespace cc | 186 } // namespace cc |
| 182 | 187 |
| 183 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 188 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
| OLD | NEW |