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

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

Issue 738983002: Move output surface fallback from cc to embedders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years 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
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/browser/renderer_host/compositor_impl_android.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 (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 virtual void ApplyViewportDeltas( 72 virtual void ApplyViewportDeltas(
73 const gfx::Vector2d& inner_delta, 73 const gfx::Vector2d& inner_delta,
74 const gfx::Vector2d& outer_delta, 74 const gfx::Vector2d& outer_delta,
75 const gfx::Vector2dF& elastic_overscroll_delta, 75 const gfx::Vector2dF& elastic_overscroll_delta,
76 float page_scale, 76 float page_scale,
77 float top_controls_delta) override {} 77 float top_controls_delta) 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 void RequestNewOutputSurface(bool fallback) override; 82 virtual void RequestNewOutputSurface() override;
83 virtual void DidInitializeOutputSurface() override {} 83 virtual void DidInitializeOutputSurface() override {}
84 virtual void DidFailToInitializeOutputSurface() override;
84 virtual void WillCommit() override {} 85 virtual void WillCommit() override {}
85 virtual void DidCommit() override; 86 virtual void DidCommit() override;
86 virtual void DidCommitAndDrawFrame() override {} 87 virtual void DidCommitAndDrawFrame() override {}
87 virtual void DidCompleteSwapBuffers() override; 88 virtual void DidCompleteSwapBuffers() override;
88 89
89 // LayerTreeHostSingleThreadClient implementation. 90 // LayerTreeHostSingleThreadClient implementation.
90 virtual void ScheduleComposite() override; 91 virtual void ScheduleComposite() override;
91 virtual void ScheduleAnimation() override; 92 virtual void ScheduleAnimation() override;
92 virtual void DidPostSwapBuffers() override; 93 virtual void DidPostSwapBuffers() override;
93 virtual void DidAbortSwapBuffers() override; 94 virtual void DidAbortSwapBuffers() override;
94 95
95 // WindowAndroidCompositor implementation. 96 // WindowAndroidCompositor implementation.
96 virtual void AttachLayerForReadback(scoped_refptr<cc::Layer> layer) override; 97 virtual void AttachLayerForReadback(scoped_refptr<cc::Layer> layer) override;
97 virtual void RequestCopyOfOutputOnRootLayer( 98 virtual void RequestCopyOfOutputOnRootLayer(
98 scoped_ptr<cc::CopyOutputRequest> request) override; 99 scoped_ptr<cc::CopyOutputRequest> request) override;
99 virtual void OnVSync(base::TimeTicks frame_time, 100 virtual void OnVSync(base::TimeTicks frame_time,
100 base::TimeDelta vsync_period) override; 101 base::TimeDelta vsync_period) override;
101 virtual void SetNeedsAnimate() override; 102 virtual void SetNeedsAnimate() override;
102 virtual ui::SystemUIResourceManager& GetSystemUIResourceManager() override; 103 virtual ui::SystemUIResourceManager& GetSystemUIResourceManager() override;
103 104
104 void SetWindowSurface(ANativeWindow* window); 105 void SetWindowSurface(ANativeWindow* window);
105 106
106 enum CompositingTrigger { 107 enum CompositingTrigger {
107 DO_NOT_COMPOSITE, 108 DO_NOT_COMPOSITE,
108 COMPOSITE_IMMEDIATELY, 109 COMPOSITE_IMMEDIATELY,
109 COMPOSITE_EVENTUALLY, 110 COMPOSITE_EVENTUALLY,
110 }; 111 };
111 void PostComposite(CompositingTrigger trigger); 112 void PostComposite(CompositingTrigger trigger);
112 void Composite(CompositingTrigger trigger); 113 void Composite(CompositingTrigger trigger);
113 void CreateOutputSurface(bool fallback); 114 void CreateOutputSurface();
114 115
115 bool WillCompositeThisFrame() const { 116 bool WillCompositeThisFrame() const {
116 return current_composite_task_ && 117 return current_composite_task_ &&
117 !current_composite_task_->callback().is_null(); 118 !current_composite_task_->callback().is_null();
118 } 119 }
119 bool DidCompositeThisFrame() const { 120 bool DidCompositeThisFrame() const {
120 return current_composite_task_ && 121 return current_composite_task_ &&
121 current_composite_task_->callback().is_null(); 122 current_composite_task_->callback().is_null();
122 } 123 }
123 bool WillComposite() const { 124 bool WillComposite() const {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 base::TimeTicks last_vsync_; 196 base::TimeTicks last_vsync_;
196 197
197 base::WeakPtrFactory<CompositorImpl> weak_factory_; 198 base::WeakPtrFactory<CompositorImpl> weak_factory_;
198 199
199 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); 200 DISALLOW_COPY_AND_ASSIGN(CompositorImpl);
200 }; 201 };
201 202
202 } // namespace content 203 } // namespace content
203 204
204 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 205 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698