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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.h

Issue 2317753002: cc: Abstract the LayerTreeHost. (Closed)
Patch Set: Rebase Created 4 years, 3 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 5 #ifndef CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 14 matching lines...) Expand all
25 #include "ui/gfx/geometry/rect.h" 25 #include "ui/gfx/geometry/rect.h"
26 26
27 namespace base { 27 namespace base {
28 class CommandLine; 28 class CommandLine;
29 } 29 }
30 30
31 namespace cc { 31 namespace cc {
32 class CopyOutputRequest; 32 class CopyOutputRequest;
33 class InputHandler; 33 class InputHandler;
34 class Layer; 34 class Layer;
35 class LayerTreeHost; 35 class LayerTreeHostInterface;
36 namespace proto { 36 namespace proto {
37 class CompositorMessage; 37 class CompositorMessage;
38 } 38 }
39 } 39 }
40 40
41 namespace ui { 41 namespace ui {
42 class LatencyInfo; 42 class LatencyInfo;
43 } 43 }
44 44
45 namespace content { 45 namespace content {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 MAX_OUTPUT_SURFACE_RETRIES = 5, 199 MAX_OUTPUT_SURFACE_RETRIES = 5,
200 }; 200 };
201 201
202 protected: 202 protected:
203 friend class RenderViewImplScaleFactorTest; 203 friend class RenderViewImplScaleFactorTest;
204 204
205 RenderWidgetCompositor(RenderWidgetCompositorDelegate* delegate, 205 RenderWidgetCompositor(RenderWidgetCompositorDelegate* delegate,
206 CompositorDependencies* compositor_deps); 206 CompositorDependencies* compositor_deps);
207 207
208 void Initialize(float device_scale_factor); 208 void Initialize(float device_scale_factor);
209 cc::LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } 209 cc::LayerTreeHostInterface* layer_tree_host() {
210 return layer_tree_host_.get();
211 }
210 212
211 private: 213 private:
212 void LayoutAndUpdateLayers(); 214 void LayoutAndUpdateLayers();
213 void InvokeLayoutAndPaintCallback(); 215 void InvokeLayoutAndPaintCallback();
214 bool CompositeIsSynchronous() const; 216 bool CompositeIsSynchronous() const;
215 void SynchronouslyComposite(); 217 void SynchronouslyComposite();
216 218
217 int num_failed_recreate_attempts_; 219 int num_failed_recreate_attempts_;
218 RenderWidgetCompositorDelegate* const delegate_; 220 RenderWidgetCompositorDelegate* const delegate_;
219 CompositorDependencies* const compositor_deps_; 221 CompositorDependencies* const compositor_deps_;
220 const bool threaded_; 222 const bool threaded_;
221 std::unique_ptr<cc::LayerTreeHost> layer_tree_host_; 223 std::unique_ptr<cc::LayerTreeHostInterface> layer_tree_host_;
222 bool never_visible_; 224 bool never_visible_;
223 225
224 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; 226 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_;
225 227
226 cc::RemoteProtoChannel::ProtoReceiver* remote_proto_channel_receiver_; 228 cc::RemoteProtoChannel::ProtoReceiver* remote_proto_channel_receiver_;
227 229
228 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; 230 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_;
229 }; 231 };
230 232
231 } // namespace content 233 } // namespace content
232 234
233 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 235 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698