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

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

Issue 23364004: Implementation of device metrics emulation in render view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void GetRenderingStats(cc::RenderingStats* stats); 45 void GetRenderingStats(cc::RenderingStats* stats);
46 void UpdateTopControlsState(cc::TopControlsState constraints, 46 void UpdateTopControlsState(cc::TopControlsState constraints,
47 cc::TopControlsState current, 47 cc::TopControlsState current,
48 bool animate); 48 bool animate);
49 void SetOverdrawBottomHeight(float overdraw_bottom_height); 49 void SetOverdrawBottomHeight(float overdraw_bottom_height);
50 void SetNeedsRedrawRect(gfx::Rect damage_rect); 50 void SetNeedsRedrawRect(gfx::Rect damage_rect);
51 void SetLatencyInfo(const ui::LatencyInfo& latency_info); 51 void SetLatencyInfo(const ui::LatencyInfo& latency_info);
52 int GetLayerTreeId() const; 52 int GetLayerTreeId() const;
53 void NotifyInputThrottledUntilCommit(); 53 void NotifyInputThrottledUntilCommit();
54 54
55 // Pass zero to cancel overriding.
56 void OverrideDeviceScaleFactor(float device_scale);
57
55 // WebLayerTreeView implementation. 58 // WebLayerTreeView implementation.
56 virtual void setSurfaceReady(); 59 virtual void setSurfaceReady();
57 virtual void setRootLayer(const WebKit::WebLayer& layer); 60 virtual void setRootLayer(const WebKit::WebLayer& layer);
58 virtual void clearRootLayer(); 61 virtual void clearRootLayer();
59 virtual void setViewportSize( 62 virtual void setViewportSize(
60 const WebKit::WebSize& unused_deprecated, 63 const WebKit::WebSize& unused_deprecated,
61 const WebKit::WebSize& device_viewport_size); 64 const WebKit::WebSize& device_viewport_size);
62 virtual WebKit::WebSize layoutViewportSize() const; 65 virtual WebKit::WebSize layoutViewportSize() const;
63 virtual WebKit::WebSize deviceViewportSize() const; 66 virtual WebKit::WebSize deviceViewportSize() const;
64 virtual WebKit::WebFloatPoint adjustEventPointForPinchZoom( 67 virtual WebKit::WebFloatPoint adjustEventPointForPinchZoom(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 OffscreenContextProviderForCompositorThread() OVERRIDE; 114 OffscreenContextProviderForCompositorThread() OVERRIDE;
112 115
113 private: 116 private:
114 RenderWidgetCompositor(RenderWidget* widget, bool threaded); 117 RenderWidgetCompositor(RenderWidget* widget, bool threaded);
115 118
116 bool initialize(cc::LayerTreeSettings settings); 119 bool initialize(cc::LayerTreeSettings settings);
117 120
118 bool threaded_; 121 bool threaded_;
119 bool suppress_schedule_composite_; 122 bool suppress_schedule_composite_;
120 RenderWidget* widget_; 123 RenderWidget* widget_;
124 // This stores the original device scale to restore back after device scale
125 // override is canceled. When device scale if not overriden, this is zero.
126 float saved_device_scale_factor_;
121 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 127 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
122 }; 128 };
123 129
124 } // namespace content 130 } // namespace content
125 131
126 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 132 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698