| OLD | NEW |
| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 virtual void setContinuousPaintingEnabled(bool enabled); | 90 virtual void setContinuousPaintingEnabled(bool enabled); |
| 91 virtual void setShowScrollBottleneckRects(bool show); | 91 virtual void setShowScrollBottleneckRects(bool show); |
| 92 | 92 |
| 93 // cc::LayerTreeHostClient implementation. | 93 // cc::LayerTreeHostClient implementation. |
| 94 virtual void WillBeginFrame() OVERRIDE; | 94 virtual void WillBeginFrame() OVERRIDE; |
| 95 virtual void DidBeginFrame() OVERRIDE; | 95 virtual void DidBeginFrame() OVERRIDE; |
| 96 virtual void Animate(double frame_begin_time) OVERRIDE; | 96 virtual void Animate(double frame_begin_time) OVERRIDE; |
| 97 virtual void Layout() OVERRIDE; | 97 virtual void Layout() OVERRIDE; |
| 98 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta, | 98 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta, |
| 99 float page_scale) OVERRIDE; | 99 float page_scale) OVERRIDE; |
| 100 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface() OVERRIDE; | 100 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) |
| 101 OVERRIDE; |
| 101 virtual void DidInitializeOutputSurface(bool success) OVERRIDE; | 102 virtual void DidInitializeOutputSurface(bool success) OVERRIDE; |
| 102 virtual void WillCommit() OVERRIDE; | 103 virtual void WillCommit() OVERRIDE; |
| 103 virtual void DidCommit() OVERRIDE; | 104 virtual void DidCommit() OVERRIDE; |
| 104 virtual void DidCommitAndDrawFrame() OVERRIDE; | 105 virtual void DidCommitAndDrawFrame() OVERRIDE; |
| 105 virtual void DidCompleteSwapBuffers() OVERRIDE; | 106 virtual void DidCompleteSwapBuffers() OVERRIDE; |
| 106 virtual void ScheduleComposite() OVERRIDE; | 107 virtual void ScheduleComposite() OVERRIDE; |
| 107 virtual scoped_refptr<cc::ContextProvider> | 108 virtual scoped_refptr<cc::ContextProvider> |
| 108 OffscreenContextProviderForMainThread() OVERRIDE; | 109 OffscreenContextProviderForMainThread() OVERRIDE; |
| 109 virtual scoped_refptr<cc::ContextProvider> | 110 virtual scoped_refptr<cc::ContextProvider> |
| 110 OffscreenContextProviderForCompositorThread() OVERRIDE; | 111 OffscreenContextProviderForCompositorThread() OVERRIDE; |
| 111 | 112 |
| 112 private: | 113 private: |
| 113 RenderWidgetCompositor(RenderWidget* widget, bool threaded); | 114 RenderWidgetCompositor(RenderWidget* widget, bool threaded); |
| 114 | 115 |
| 115 bool initialize(cc::LayerTreeSettings settings); | 116 bool initialize(cc::LayerTreeSettings settings); |
| 116 | 117 |
| 117 bool threaded_; | 118 bool threaded_; |
| 118 bool suppress_schedule_composite_; | 119 bool suppress_schedule_composite_; |
| 119 RenderWidget* widget_; | 120 RenderWidget* widget_; |
| 120 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 121 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
| 121 }; | 122 }; |
| 122 | 123 |
| 123 } // namespace content | 124 } // namespace content |
| 124 | 125 |
| 125 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 126 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
| OLD | NEW |