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/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 enum { | 162 enum { |
163 OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK = 4, | 163 OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK = 4, |
164 MAX_OUTPUT_SURFACE_RETRIES = 5, | 164 MAX_OUTPUT_SURFACE_RETRIES = 5, |
165 }; | 165 }; |
166 | 166 |
167 protected: | 167 protected: |
168 RenderWidgetCompositor(RenderWidget* widget, | 168 RenderWidgetCompositor(RenderWidget* widget, |
169 CompositorDependencies* compositor_deps); | 169 CompositorDependencies* compositor_deps); |
170 | 170 |
171 void Initialize(); | 171 void Initialize(); |
172 | |
173 cc::LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } | 172 cc::LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } |
174 | 173 |
175 private: | 174 private: |
176 int num_failed_recreate_attempts_; | 175 int num_failed_recreate_attempts_; |
177 RenderWidget* widget_; | 176 RenderWidget* widget_; |
178 CompositorDependencies* compositor_deps_; | 177 CompositorDependencies* compositor_deps_; |
179 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 178 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
180 | 179 |
181 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; | 180 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; |
182 | 181 |
183 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; | 182 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; |
184 }; | 183 }; |
185 | 184 |
186 } // namespace content | 185 } // namespace content |
187 | 186 |
188 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 187 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
OLD | NEW |