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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 void GetRenderingStats(cc::RenderingStats* stats); | 46 void GetRenderingStats(cc::RenderingStats* stats); |
47 void UpdateTopControlsState(cc::TopControlsState constraints, | 47 void UpdateTopControlsState(cc::TopControlsState constraints, |
48 cc::TopControlsState current, | 48 cc::TopControlsState current, |
49 bool animate); | 49 bool animate); |
50 void SetOverdrawBottomHeight(float overdraw_bottom_height); | 50 void SetOverdrawBottomHeight(float overdraw_bottom_height); |
51 void SetNeedsRedrawRect(gfx::Rect damage_rect); | 51 void SetNeedsRedrawRect(gfx::Rect damage_rect); |
52 void SetLatencyInfo(const ui::LatencyInfo& latency_info); | 52 void SetLatencyInfo(const ui::LatencyInfo& latency_info); |
53 int GetLayerTreeId() const; | 53 int GetLayerTreeId() const; |
54 void NotifyInputThrottledUntilCommit(); | 54 void NotifyInputThrottledUntilCommit(); |
55 const cc::Layer* GetRootLayer() const; | 55 const cc::Layer* GetRootLayer() const; |
56 // Pass zero to cancel overriding. | |
57 void OverrideDeviceScaleFactor(float device_scale); | |
aelias_OOO_until_Jul13
2013/09/13 23:51:44
Obsolete?
dgozman
2013/09/14 07:42:42
Nope. This is to ensure that compositor has the re
aelias_OOO_until_Jul13
2013/09/14 07:53:10
Hmm, in that case I would prefer that your overrid
dgozman
2013/09/19 10:17:11
Done.
| |
56 | 58 |
57 // WebLayerTreeView implementation. | 59 // WebLayerTreeView implementation. |
58 virtual void setSurfaceReady(); | 60 virtual void setSurfaceReady(); |
59 virtual void setRootLayer(const WebKit::WebLayer& layer); | 61 virtual void setRootLayer(const WebKit::WebLayer& layer); |
60 virtual void clearRootLayer(); | 62 virtual void clearRootLayer(); |
61 virtual void setViewportSize( | 63 virtual void setViewportSize( |
62 const WebKit::WebSize& unused_deprecated, | 64 const WebKit::WebSize& unused_deprecated, |
63 const WebKit::WebSize& device_viewport_size); | 65 const WebKit::WebSize& device_viewport_size); |
64 virtual WebKit::WebSize layoutViewportSize() const; | 66 virtual WebKit::WebSize layoutViewportSize() const; |
65 virtual WebKit::WebSize deviceViewportSize() const; | 67 virtual WebKit::WebSize deviceViewportSize() const; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 OffscreenContextProviderForCompositorThread() OVERRIDE; | 115 OffscreenContextProviderForCompositorThread() OVERRIDE; |
114 | 116 |
115 private: | 117 private: |
116 RenderWidgetCompositor(RenderWidget* widget, bool threaded); | 118 RenderWidgetCompositor(RenderWidget* widget, bool threaded); |
117 | 119 |
118 bool initialize(cc::LayerTreeSettings settings); | 120 bool initialize(cc::LayerTreeSettings settings); |
119 | 121 |
120 bool threaded_; | 122 bool threaded_; |
121 bool suppress_schedule_composite_; | 123 bool suppress_schedule_composite_; |
122 RenderWidget* widget_; | 124 RenderWidget* widget_; |
125 // This stores the original device scale to restore back after device scale | |
126 // override is canceled. Zero means no override is in place. | |
127 float saved_device_scale_factor_; | |
123 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 128 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
124 }; | 129 }; |
125 | 130 |
126 } // namespace content | 131 } // namespace content |
127 | 132 |
128 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 133 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
OLD | NEW |