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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.h

Issue 348093004: Make cc output surface creation async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android compile fixes Created 6 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/cancelable_callback.h" 9 #include "base/cancelable_callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // LayerTreeHostClient implementation. 73 // LayerTreeHostClient implementation.
74 virtual void WillBeginMainFrame(int frame_id) OVERRIDE {} 74 virtual void WillBeginMainFrame(int frame_id) OVERRIDE {}
75 virtual void DidBeginMainFrame() OVERRIDE {} 75 virtual void DidBeginMainFrame() OVERRIDE {}
76 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE {} 76 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE {}
77 virtual void Layout() OVERRIDE; 77 virtual void Layout() OVERRIDE;
78 virtual void ApplyViewportDeltas( 78 virtual void ApplyViewportDeltas(
79 const gfx::Vector2d& scroll_delta, 79 const gfx::Vector2d& scroll_delta,
80 float page_scale, 80 float page_scale,
81 float top_controls_delta) OVERRIDE {} 81 float top_controls_delta) OVERRIDE {}
82 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) 82 virtual void RequestNewOutputSurface(bool fallback) OVERRIDE;
83 OVERRIDE;
84 virtual void DidInitializeOutputSurface() OVERRIDE {} 83 virtual void DidInitializeOutputSurface() OVERRIDE {}
85 virtual void WillCommit() OVERRIDE {} 84 virtual void WillCommit() OVERRIDE {}
86 virtual void DidCommit() OVERRIDE; 85 virtual void DidCommit() OVERRIDE;
87 virtual void DidCommitAndDrawFrame() OVERRIDE {} 86 virtual void DidCommitAndDrawFrame() OVERRIDE {}
88 virtual void DidCompleteSwapBuffers() OVERRIDE; 87 virtual void DidCompleteSwapBuffers() OVERRIDE;
89 88
90 // LayerTreeHostSingleThreadClient implementation. 89 // LayerTreeHostSingleThreadClient implementation.
91 virtual void ScheduleComposite() OVERRIDE; 90 virtual void ScheduleComposite() OVERRIDE;
92 virtual void ScheduleAnimation() OVERRIDE; 91 virtual void ScheduleAnimation() OVERRIDE;
93 virtual void DidPostSwapBuffers() OVERRIDE; 92 virtual void DidPostSwapBuffers() OVERRIDE;
(...skipping 11 matching lines...) Expand all
105 virtual void SetNeedsAnimate() OVERRIDE; 104 virtual void SetNeedsAnimate() OVERRIDE;
106 virtual ui::SystemUIResourceManager& GetSystemUIResourceManager() OVERRIDE; 105 virtual ui::SystemUIResourceManager& GetSystemUIResourceManager() OVERRIDE;
107 106
108 enum CompositingTrigger { 107 enum CompositingTrigger {
109 DO_NOT_COMPOSITE, 108 DO_NOT_COMPOSITE,
110 COMPOSITE_IMMEDIATELY, 109 COMPOSITE_IMMEDIATELY,
111 COMPOSITE_EVENTUALLY, 110 COMPOSITE_EVENTUALLY,
112 }; 111 };
113 void PostComposite(CompositingTrigger trigger); 112 void PostComposite(CompositingTrigger trigger);
114 void Composite(CompositingTrigger trigger); 113 void Composite(CompositingTrigger trigger);
114 void CreateOutputSurface(bool fallback);
115 115
116 bool WillCompositeThisFrame() const { 116 bool WillCompositeThisFrame() const {
117 return current_composite_task_ && 117 return current_composite_task_ &&
118 !current_composite_task_->callback().is_null(); 118 !current_composite_task_->callback().is_null();
119 } 119 }
120 bool DidCompositeThisFrame() const { 120 bool DidCompositeThisFrame() const {
121 return current_composite_task_ && 121 return current_composite_task_ &&
122 current_composite_task_->callback().is_null(); 122 current_composite_task_->callback().is_null();
123 } 123 }
124 bool WillComposite() const { 124 bool WillComposite() const {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 base::TimeTicks last_vsync_; 185 base::TimeTicks last_vsync_;
186 186
187 base::WeakPtrFactory<CompositorImpl> weak_factory_; 187 base::WeakPtrFactory<CompositorImpl> weak_factory_;
188 188
189 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); 189 DISALLOW_COPY_AND_ASSIGN(CompositorImpl);
190 }; 190 };
191 191
192 } // namespace content 192 } // namespace content
193 193
194 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 194 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698