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

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

Issue 12472015: Add implementation of WebWidgetClient::initializeLayerTreeView() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: null check compositor_, initialization can fail Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/gpu/render_widget_compositor.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) 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 "base/time.h" 8 #include "base/time.h"
9 #include "cc/layer_tree_host_client.h" 9 #include "cc/layer_tree_host_client.h"
10 #include "cc/layer_tree_settings.h" 10 #include "cc/layer_tree_settings.h"
11 #include "cc/rendering_stats.h" 11 #include "cc/rendering_stats.h"
12 #include "skia/ext/refptr.h" 12 #include "skia/ext/refptr.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h"
14 14
15 class SkPicture; 15 class SkPicture;
16 16
17 namespace cc { 17 namespace cc {
18 class LayerTreeHost; 18 class LayerTreeHost;
19 } 19 }
20 20
21 namespace content { 21 namespace content {
22 class RenderWidget; 22 class RenderWidget;
23 23
24 class RenderWidgetCompositor : public WebKit::WebLayerTreeView, 24 class RenderWidgetCompositor : public WebKit::WebLayerTreeView,
25 public cc::LayerTreeHostClient { 25 public cc::LayerTreeHostClient {
26 public: 26 public:
27 // Attempt to construct and initialize a compositor instance for the widget 27 // Attempt to construct and initialize a compositor instance for the widget
28 // with the given settings. Returns NULL if initialization fails. 28 // with the given settings. Returns NULL if initialization fails.
29 static scoped_ptr<RenderWidgetCompositor> Create( 29 static scoped_ptr<RenderWidgetCompositor> Create(RenderWidget* widget);
30 RenderWidget* widget,
31 WebKit::WebLayerTreeView::Settings settings);
32 30
33 virtual ~RenderWidgetCompositor(); 31 virtual ~RenderWidgetCompositor();
34 32
35 void SetSuppressScheduleComposite(bool suppress); 33 void SetSuppressScheduleComposite(bool suppress);
36 void Animate(base::TimeTicks time); 34 void Animate(base::TimeTicks time);
37 void Composite(); 35 void Composite();
38 void GetRenderingStats(cc::RenderingStats* stats); 36 void GetRenderingStats(cc::RenderingStats* stats);
39 skia::RefPtr<SkPicture> CapturePicture(); 37 skia::RefPtr<SkPicture> CapturePicture();
40 void EnableHidingTopControls(bool enable); 38 void EnableHidingTopControls(bool enable);
41 39
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 bool threaded_; 101 bool threaded_;
104 bool suppress_schedule_composite_; 102 bool suppress_schedule_composite_;
105 RenderWidget* widget_; 103 RenderWidget* widget_;
106 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 104 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
107 }; 105 };
108 106
109 } // namespace content 107 } // namespace content
110 108
111 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 109 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
112 110
OLDNEW
« no previous file with comments | « no previous file | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698