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

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

Issue 2769823002: Add decode() functionality to image elements. (Closed)
Patch Set: update Created 3 years, 9 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
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/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 bool IsInsideDraw() override; 90 bool IsInsideDraw() override;
91 void RenewTreePriority() override {} 91 void RenewTreePriority() override {}
92 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, 92 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
93 base::TimeDelta delay) override {} 93 base::TimeDelta delay) override {}
94 void DidActivateSyncTree() override; 94 void DidActivateSyncTree() override;
95 void WillPrepareTiles() override; 95 void WillPrepareTiles() override;
96 void DidPrepareTiles() override; 96 void DidPrepareTiles() override;
97 void DidCompletePageScaleAnimationOnImplThread() override; 97 void DidCompletePageScaleAnimationOnImplThread() override;
98 void OnDrawForCompositorFrameSink(bool resourceless_software_draw) override; 98 void OnDrawForCompositorFrameSink(bool resourceless_software_draw) override;
99 void NeedsImplSideInvalidation() override; 99 void NeedsImplSideInvalidation() override;
100 void NotifyImageDecodeRequestFinished() override;
100 101
101 void RequestNewCompositorFrameSink(); 102 void RequestNewCompositorFrameSink();
102 103
103 // Called by the legacy path where RenderWidget does the scheduling. 104 // Called by the legacy path where RenderWidget does the scheduling.
104 void CompositeImmediately(base::TimeTicks frame_begin_time); 105 void CompositeImmediately(base::TimeTicks frame_begin_time);
105 106
106 protected: 107 protected:
107 SingleThreadProxy(LayerTreeHost* layer_tree_host, 108 SingleThreadProxy(LayerTreeHost* layer_tree_host,
108 LayerTreeHostSingleThreadClient* client, 109 LayerTreeHostSingleThreadClient* client,
109 TaskRunnerProvider* task_runner_provider); 110 TaskRunnerProvider* task_runner_provider);
110 111
111 private: 112 private:
112 void BeginMainFrame(const BeginFrameArgs& begin_frame_args); 113 void BeginMainFrame(const BeginFrameArgs& begin_frame_args);
113 void BeginMainFrameAbortedOnImplThread(CommitEarlyOutReason reason); 114 void BeginMainFrameAbortedOnImplThread(CommitEarlyOutReason reason);
114 void DoBeginMainFrame(const BeginFrameArgs& begin_frame_args); 115 void DoBeginMainFrame(const BeginFrameArgs& begin_frame_args);
115 void DoCommit(); 116 void DoCommit();
116 DrawResult DoComposite(LayerTreeHostImpl::FrameData* frame); 117 DrawResult DoComposite(LayerTreeHostImpl::FrameData* frame);
117 void DoSwap(); 118 void DoSwap();
118 void DidCommitAndDrawFrame(); 119 void DidCommitAndDrawFrame();
119 void CommitComplete(); 120 void CommitComplete();
120 121
121 bool ShouldComposite() const; 122 bool ShouldComposite() const;
122 void ScheduleRequestNewCompositorFrameSink(); 123 void ScheduleRequestNewCompositorFrameSink();
124 void IssueImageDecodeFinishedCallbacks();
123 125
124 // Accessed on main thread only. 126 // Accessed on main thread only.
125 LayerTreeHost* layer_tree_host_; 127 LayerTreeHost* layer_tree_host_;
126 LayerTreeHostSingleThreadClient* single_thread_client_; 128 LayerTreeHostSingleThreadClient* single_thread_client_;
127 129
128 TaskRunnerProvider* task_runner_provider_; 130 TaskRunnerProvider* task_runner_provider_;
129 131
130 // Used on the Thread, but checked on main thread during 132 // Used on the Thread, but checked on main thread during
131 // initialization/shutdown. 133 // initialization/shutdown.
132 std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl_; 134 std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 private: 235 private:
234 DebugScopedSetImplThread impl_thread_; 236 DebugScopedSetImplThread impl_thread_;
235 DebugScopedSetMainThreadBlocked main_thread_blocked_; 237 DebugScopedSetMainThreadBlocked main_thread_blocked_;
236 238
237 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); 239 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked);
238 }; 240 };
239 241
240 } // namespace cc 242 } // namespace cc
241 243
242 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ 244 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698