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

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

Issue 14772021: cc::OutputSurfaceClient::InitializeForGL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Dedup and refactor code Created 7 years, 7 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
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_THREAD_PROXY_H_ 5 #ifndef CC_TREES_THREAD_PROXY_H_
6 #define CC_TREES_THREAD_PROXY_H_ 6 #define CC_TREES_THREAD_PROXY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE; 54 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE;
55 virtual void Stop() OVERRIDE; 55 virtual void Stop() OVERRIDE;
56 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; 56 virtual size_t MaxPartialTextureUpdates() const OVERRIDE;
57 virtual void AcquireLayerTextures() OVERRIDE; 57 virtual void AcquireLayerTextures() OVERRIDE;
58 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; 58 virtual void ForceSerializeOnSwapBuffers() OVERRIDE;
59 virtual skia::RefPtr<SkPicture> CapturePicture() OVERRIDE; 59 virtual skia::RefPtr<SkPicture> CapturePicture() OVERRIDE;
60 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; 60 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE;
61 virtual bool CommitPendingForTesting() OVERRIDE; 61 virtual bool CommitPendingForTesting() OVERRIDE;
62 62
63 // LayerTreeHostImplClient implementation 63 // LayerTreeHostImplClient implementation
64 virtual void DidUpdateCapabilitiesOnImplThread() OVERRIDE;
64 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; 65 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE;
65 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; 66 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE;
66 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, 67 virtual void OnVSyncParametersChanged(base::TimeTicks timebase,
67 base::TimeDelta interval) OVERRIDE; 68 base::TimeDelta interval) OVERRIDE;
68 virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE; 69 virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE;
69 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; 70 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE;
70 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE; 71 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE;
71 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; 72 virtual void SetNeedsRedrawOnImplThread() OVERRIDE;
72 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect dirty_rect) OVERRIDE; 73 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect dirty_rect) OVERRIDE;
73 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; 74 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void BeginFrame(scoped_ptr<BeginFrameAndCommitState> begin_frame_state); 133 void BeginFrame(scoped_ptr<BeginFrameAndCommitState> begin_frame_state);
133 void DidCommitAndDrawFrame(); 134 void DidCommitAndDrawFrame();
134 void DidCompleteSwapBuffers(); 135 void DidCompleteSwapBuffers();
135 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue, 136 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue,
136 base::Time wall_clock_time); 137 base::Time wall_clock_time);
137 void DoCreateAndInitializeOutputSurface(); 138 void DoCreateAndInitializeOutputSurface();
138 // |capabilities| is set only when |success| is true. 139 // |capabilities| is set only when |success| is true.
139 void OnOutputSurfaceInitializeAttempted( 140 void OnOutputSurfaceInitializeAttempted(
140 bool success, 141 bool success,
141 const RendererCapabilities& capabilities); 142 const RendererCapabilities& capabilities);
143 void DidUpdateCapabilities(const RendererCapabilities& capabilities);
142 144
143 // Called on impl thread. 145 // Called on impl thread.
144 struct ReadbackRequest { 146 struct ReadbackRequest {
145 CompletionEvent completion; 147 CompletionEvent completion;
146 bool success; 148 bool success;
147 void* pixels; 149 void* pixels;
148 gfx::Rect rect; 150 gfx::Rect rect;
149 }; 151 };
150 struct CommitPendingRequest { 152 struct CommitPendingRequest {
151 CompletionEvent completion; 153 CompletionEvent completion;
152 bool commit_pending; 154 bool commit_pending;
153 }; 155 };
156 void UpdateCapabilitiesOnImplThread();
154 void ForceBeginFrameOnImplThread(CompletionEvent* completion); 157 void ForceBeginFrameOnImplThread(CompletionEvent* completion);
155 void BeginFrameCompleteOnImplThread( 158 void BeginFrameCompleteOnImplThread(
156 CompletionEvent* completion, 159 CompletionEvent* completion,
157 ResourceUpdateQueue* queue, 160 ResourceUpdateQueue* queue,
158 scoped_refptr<cc::ContextProvider> offscreen_context_provider); 161 scoped_refptr<cc::ContextProvider> offscreen_context_provider);
159 void BeginFrameAbortedOnImplThread(); 162 void BeginFrameAbortedOnImplThread();
160 void RequestReadbackOnImplThread(ReadbackRequest* request); 163 void RequestReadbackOnImplThread(ReadbackRequest* request);
161 void FinishAllRenderingOnImplThread(CompletionEvent* completion); 164 void FinishAllRenderingOnImplThread(CompletionEvent* completion);
162 void InitializeImplOnImplThread(CompletionEvent* completion); 165 void InitializeImplOnImplThread(CompletionEvent* completion);
163 void SetLayerTreeHostClientReadyOnImplThread(); 166 void SetLayerTreeHostClientReadyOnImplThread();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 261
259 base::TimeTicks smoothness_takes_priority_expiration_time_; 262 base::TimeTicks smoothness_takes_priority_expiration_time_;
260 bool renew_tree_priority_on_impl_thread_pending_; 263 bool renew_tree_priority_on_impl_thread_pending_;
261 264
262 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); 265 DISALLOW_COPY_AND_ASSIGN(ThreadProxy);
263 }; 266 };
264 267
265 } // namespace cc 268 } // namespace cc
266 269
267 #endif // CC_TREES_THREAD_PROXY_H_ 270 #endif // CC_TREES_THREAD_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698