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

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

Issue 19267016: Add a flag to allow renderer to use software compositor when GL compositor doesn't work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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) 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/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "cc/debug/rendering_stats.h" 10 #include "cc/debug/rendering_stats.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 virtual void setContinuousPaintingEnabled(bool enabled); 89 virtual void setContinuousPaintingEnabled(bool enabled);
90 virtual void setShowScrollBottleneckRects(bool show); 90 virtual void setShowScrollBottleneckRects(bool show);
91 91
92 // cc::LayerTreeHostClient implementation. 92 // cc::LayerTreeHostClient implementation.
93 virtual void WillBeginFrame() OVERRIDE; 93 virtual void WillBeginFrame() OVERRIDE;
94 virtual void DidBeginFrame() OVERRIDE; 94 virtual void DidBeginFrame() OVERRIDE;
95 virtual void Animate(double frame_begin_time) OVERRIDE; 95 virtual void Animate(double frame_begin_time) OVERRIDE;
96 virtual void Layout() OVERRIDE; 96 virtual void Layout() OVERRIDE;
97 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta, 97 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta,
98 float page_scale) OVERRIDE; 98 float page_scale) OVERRIDE;
99 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface() OVERRIDE; 99 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback)
100 OVERRIDE;
100 virtual void DidInitializeOutputSurface(bool success) OVERRIDE; 101 virtual void DidInitializeOutputSurface(bool success) OVERRIDE;
101 virtual void WillCommit() OVERRIDE; 102 virtual void WillCommit() OVERRIDE;
102 virtual void DidCommit() OVERRIDE; 103 virtual void DidCommit() OVERRIDE;
103 virtual void DidCommitAndDrawFrame() OVERRIDE; 104 virtual void DidCommitAndDrawFrame() OVERRIDE;
104 virtual void DidCompleteSwapBuffers() OVERRIDE; 105 virtual void DidCompleteSwapBuffers() OVERRIDE;
105 virtual void ScheduleComposite() OVERRIDE; 106 virtual void ScheduleComposite() OVERRIDE;
106 virtual scoped_refptr<cc::ContextProvider> 107 virtual scoped_refptr<cc::ContextProvider>
107 OffscreenContextProviderForMainThread() OVERRIDE; 108 OffscreenContextProviderForMainThread() OVERRIDE;
108 virtual scoped_refptr<cc::ContextProvider> 109 virtual scoped_refptr<cc::ContextProvider>
109 OffscreenContextProviderForCompositorThread() OVERRIDE; 110 OffscreenContextProviderForCompositorThread() OVERRIDE;
110 111
111 private: 112 private:
112 RenderWidgetCompositor(RenderWidget* widget, bool threaded); 113 RenderWidgetCompositor(RenderWidget* widget, bool threaded);
113 114
114 bool initialize(cc::LayerTreeSettings settings); 115 bool initialize(cc::LayerTreeSettings settings);
115 116
116 bool threaded_; 117 bool threaded_;
117 bool suppress_schedule_composite_; 118 bool suppress_schedule_composite_;
118 RenderWidget* widget_; 119 RenderWidget* widget_;
119 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 120 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
120 }; 121 };
121 122
122 } // namespace content 123 } // namespace content
123 124
124 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 125 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698