Chromium Code Reviews| 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" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "cc/input/top_controls_state.h" | 12 #include "cc/input/top_controls_state.h" |
| 13 #include "cc/output/managed_memory_policy.h" | |
| 13 #include "cc/output/swap_promise.h" | 14 #include "cc/output/swap_promise.h" |
| 14 #include "cc/trees/layer_tree_host_client.h" | 15 #include "cc/trees/layer_tree_host_client.h" |
| 15 #include "cc/trees/layer_tree_host_single_thread_client.h" | 16 #include "cc/trees/layer_tree_host_single_thread_client.h" |
| 16 #include "cc/trees/layer_tree_settings.h" | 17 #include "cc/trees/layer_tree_settings.h" |
| 17 #include "cc/trees/swap_promise_monitor.h" | 18 #include "cc/trees/swap_promise_monitor.h" |
| 18 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 19 #include "content/renderer/gpu/compositor_dependencies.h" | 20 #include "content/renderer/gpu/compositor_dependencies.h" |
| 20 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" | 21 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" |
| 21 #include "third_party/skia/include/core/SkBitmap.h" | 22 #include "third_party/skia/include/core/SkBitmap.h" |
| 22 #include "ui/gfx/geometry/rect.h" | 23 #include "ui/gfx/geometry/rect.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 void SetNeedsCommit(); | 72 void SetNeedsCommit(); |
| 72 void NotifyInputThrottledUntilCommit(); | 73 void NotifyInputThrottledUntilCommit(); |
| 73 const cc::Layer* GetRootLayer() const; | 74 const cc::Layer* GetRootLayer() const; |
| 74 int ScheduleMicroBenchmark( | 75 int ScheduleMicroBenchmark( |
| 75 const std::string& name, | 76 const std::string& name, |
| 76 scoped_ptr<base::Value> value, | 77 scoped_ptr<base::Value> value, |
| 77 const base::Callback<void(scoped_ptr<base::Value>)>& callback); | 78 const base::Callback<void(scoped_ptr<base::Value>)>& callback); |
| 78 bool SendMessageToMicroBenchmark(int id, scoped_ptr<base::Value> value); | 79 bool SendMessageToMicroBenchmark(int id, scoped_ptr<base::Value> value); |
| 79 void StartCompositor(); | 80 void StartCompositor(); |
| 80 void SetSurfaceIdNamespace(uint32_t surface_id_namespace); | 81 void SetSurfaceIdNamespace(uint32_t surface_id_namespace); |
| 82 cc::ManagedMemoryPolicy GetGpuMemoryPolicy(cc::ManagedMemoryPolicy& policy); | |
|
ccameron
2015/09/14 17:44:51
nit: |policy| should be const reference.
sohanjg
2015/09/15 10:37:48
Done.
| |
| 81 | 83 |
| 82 // WebLayerTreeView implementation. | 84 // WebLayerTreeView implementation. |
| 83 virtual void setRootLayer(const blink::WebLayer& layer); | 85 virtual void setRootLayer(const blink::WebLayer& layer); |
| 84 virtual void clearRootLayer(); | 86 virtual void clearRootLayer(); |
| 85 virtual void attachCompositorAnimationTimeline( | 87 virtual void attachCompositorAnimationTimeline( |
| 86 blink::WebCompositorAnimationTimeline* compositor_timeline); | 88 blink::WebCompositorAnimationTimeline* compositor_timeline); |
| 87 virtual void detachCompositorAnimationTimeline( | 89 virtual void detachCompositorAnimationTimeline( |
| 88 blink::WebCompositorAnimationTimeline* compositor_timeline); | 90 blink::WebCompositorAnimationTimeline* compositor_timeline); |
| 89 virtual void setViewportSize( | 91 virtual void setViewportSize( |
| 90 const blink::WebSize& unused_deprecated, | 92 const blink::WebSize& unused_deprecated, |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 | 197 |
| 196 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; | 198 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; |
| 197 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; | 199 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; |
| 198 | 200 |
| 199 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; | 201 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; |
| 200 }; | 202 }; |
| 201 | 203 |
| 202 } // namespace content | 204 } // namespace content |
| 203 | 205 |
| 204 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 206 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
| OLD | NEW |