Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: cc/trees/single_thread_proxy.h

Issue 13613003: cc: Make animations tick regardless of drawing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Drop extra statemachine function Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual skia::RefPtr<SkPicture> CapturePicture() OVERRIDE; 46 virtual skia::RefPtr<SkPicture> CapturePicture() OVERRIDE;
47 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; 47 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE;
48 virtual bool CommitPendingForTesting() OVERRIDE; 48 virtual bool CommitPendingForTesting() OVERRIDE;
49 49
50 // LayerTreeHostImplClient implementation 50 // LayerTreeHostImplClient implementation
51 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; 51 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE;
52 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; 52 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE;
53 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, 53 virtual void OnVSyncParametersChanged(base::TimeTicks timebase,
54 base::TimeDelta interval) OVERRIDE {} 54 base::TimeDelta interval) OVERRIDE {}
55 virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE {} 55 virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE {}
56 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE {} 56 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE;
57 virtual void OnHasPendingTreeStateChanged(bool have_pending_tree) OVERRIDE; 57 virtual void OnHasPendingTreeStateChanged(bool have_pending_tree) OVERRIDE;
58 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; 58 virtual void SetNeedsRedrawOnImplThread() OVERRIDE;
59 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; 59 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE;
60 virtual void SetNeedsCommitOnImplThread() OVERRIDE; 60 virtual void SetNeedsCommitOnImplThread() OVERRIDE;
61 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; 61 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE;
62 virtual void PostAnimationEventsToMainThreadOnImplThread( 62 virtual void PostAnimationEventsToMainThreadOnImplThread(
63 scoped_ptr<AnimationEventsVector> events, 63 scoped_ptr<AnimationEventsVector> events,
64 base::Time wall_clock_time) OVERRIDE; 64 base::Time wall_clock_time) OVERRIDE;
65 virtual bool ReduceContentsTextureMemoryOnImplThread( 65 virtual bool ReduceContentsTextureMemoryOnImplThread(
66 size_t limit_bytes, 66 size_t limit_bytes,
(...skipping 11 matching lines...) Expand all
78 private: 78 private:
79 explicit SingleThreadProxy(LayerTreeHost* layer_tree_host); 79 explicit SingleThreadProxy(LayerTreeHost* layer_tree_host);
80 80
81 bool CommitAndComposite(base::TimeTicks frame_begin_time); 81 bool CommitAndComposite(base::TimeTicks frame_begin_time);
82 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue); 82 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue);
83 bool DoComposite( 83 bool DoComposite(
84 scoped_refptr<cc::ContextProvider> offscreen_context_provider, 84 scoped_refptr<cc::ContextProvider> offscreen_context_provider,
85 base::TimeTicks frame_begin_time); 85 base::TimeTicks frame_begin_time);
86 void DidSwapFrame(); 86 void DidSwapFrame();
87 87
88 bool ShouldComposite() const;
89
88 // Accessed on main thread only. 90 // Accessed on main thread only.
89 LayerTreeHost* layer_tree_host_; 91 LayerTreeHost* layer_tree_host_;
90 bool output_surface_lost_; 92 bool output_surface_lost_;
91 bool created_offscreen_context_provider_; 93 bool created_offscreen_context_provider_;
92 94
93 // Holds on to the context between initializeContext() and 95 // Holds on to the context between initializeContext() and
94 // InitializeRenderer() calls. Shouldn't be used for anything else. 96 // InitializeRenderer() calls. Shouldn't be used for anything else.
95 scoped_ptr<OutputSurface> output_surface_before_initialization_; 97 scoped_ptr<OutputSurface> output_surface_before_initialization_;
96 98
97 // Used on the Thread, but checked on main thread during 99 // Used on the Thread, but checked on main thread during
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 private: 166 private:
165 DebugScopedSetImplThread impl_thread_; 167 DebugScopedSetImplThread impl_thread_;
166 DebugScopedSetMainThreadBlocked main_thread_blocked_; 168 DebugScopedSetMainThreadBlocked main_thread_blocked_;
167 169
168 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); 170 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked);
169 }; 171 };
170 172
171 } // namespace cc 173 } // namespace cc
172 174
173 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ 175 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698