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

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

Issue 511253003: Made Blink aware of top controls offset (Chromium-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash + mojo example build break Created 6 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
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/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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 virtual ~RenderWidgetCompositor(); 46 virtual ~RenderWidgetCompositor();
47 47
48 const base::WeakPtr<cc::InputHandler>& GetInputHandler(); 48 const base::WeakPtr<cc::InputHandler>& GetInputHandler();
49 bool BeginMainFrameRequested() const; 49 bool BeginMainFrameRequested() const;
50 void SetNeedsDisplayOnAllLayers(); 50 void SetNeedsDisplayOnAllLayers();
51 void SetRasterizeOnlyVisibleContent(); 51 void SetRasterizeOnlyVisibleContent();
52 void UpdateTopControlsState(cc::TopControlsState constraints, 52 void UpdateTopControlsState(cc::TopControlsState constraints,
53 cc::TopControlsState current, 53 cc::TopControlsState current,
54 bool animate); 54 bool animate);
55 void SetTopControlsLayoutHeight(float top_controls_layout_height); 55 void SetTopControlsLayoutHeight(float height);
56 void SetNeedsRedrawRect(gfx::Rect damage_rect); 56 void SetNeedsRedrawRect(gfx::Rect damage_rect);
57 // Like setNeedsRedraw but forces the frame to be drawn, without early-outs. 57 // Like setNeedsRedraw but forces the frame to be drawn, without early-outs.
58 // Redraw will be forced after the next commit 58 // Redraw will be forced after the next commit
59 void SetNeedsForcedRedraw(); 59 void SetNeedsForcedRedraw();
60 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped 60 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped
61 // LatencyInfoSwapPromiseMonitor. During the life time of the 61 // LatencyInfoSwapPromiseMonitor. During the life time of the
62 // LatencyInfoSwapPromiseMonitor, if SetNeedsCommit() or SetNeedsUpdateLayer() 62 // LatencyInfoSwapPromiseMonitor, if SetNeedsCommit() or SetNeedsUpdateLayer()
63 // is called on LayerTreeHost, the original latency info will be turned 63 // is called on LayerTreeHost, the original latency info will be turned
64 // into a LatencyInfoSwapPromise. 64 // into a LatencyInfoSwapPromise.
65 scoped_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( 65 scoped_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const blink::WebLayer* outerViewportScrollLayer) OVERRIDE; 118 const blink::WebLayer* outerViewportScrollLayer) OVERRIDE;
119 virtual void clearViewportLayers() OVERRIDE; 119 virtual void clearViewportLayers() OVERRIDE;
120 virtual void registerSelection(const blink::WebSelectionBound& start, 120 virtual void registerSelection(const blink::WebSelectionBound& start,
121 const blink::WebSelectionBound& end) OVERRIDE; 121 const blink::WebSelectionBound& end) OVERRIDE;
122 virtual void clearSelection() OVERRIDE; 122 virtual void clearSelection() OVERRIDE;
123 virtual void setShowFPSCounter(bool show); 123 virtual void setShowFPSCounter(bool show);
124 virtual void setShowPaintRects(bool show); 124 virtual void setShowPaintRects(bool show);
125 virtual void setShowDebugBorders(bool show); 125 virtual void setShowDebugBorders(bool show);
126 virtual void setContinuousPaintingEnabled(bool enabled); 126 virtual void setContinuousPaintingEnabled(bool enabled);
127 virtual void setShowScrollBottleneckRects(bool show); 127 virtual void setShowScrollBottleneckRects(bool show);
128 virtual void setTopControlsContentOffset(float);
128 129
129 // cc::LayerTreeHostClient implementation. 130 // cc::LayerTreeHostClient implementation.
130 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; 131 virtual void WillBeginMainFrame(int frame_id) OVERRIDE;
131 virtual void DidBeginMainFrame() OVERRIDE; 132 virtual void DidBeginMainFrame() OVERRIDE;
132 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE; 133 virtual void BeginMainFrame(const cc::BeginFrameArgs& args) OVERRIDE;
133 virtual void Layout() OVERRIDE; 134 virtual void Layout() OVERRIDE;
134 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, 135 virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
135 float page_scale) OVERRIDE; 136 float page_scale,
137 float top_controls_delta) OVERRIDE;
136 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) 138 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback)
137 OVERRIDE; 139 OVERRIDE;
138 virtual void DidInitializeOutputSurface() OVERRIDE; 140 virtual void DidInitializeOutputSurface() OVERRIDE;
139 virtual void WillCommit() OVERRIDE; 141 virtual void WillCommit() OVERRIDE;
140 virtual void DidCommit() OVERRIDE; 142 virtual void DidCommit() OVERRIDE;
141 virtual void DidCommitAndDrawFrame() OVERRIDE; 143 virtual void DidCommitAndDrawFrame() OVERRIDE;
142 virtual void DidCompleteSwapBuffers() OVERRIDE; 144 virtual void DidCompleteSwapBuffers() OVERRIDE;
143 virtual void RateLimitSharedMainThreadContext() OVERRIDE; 145 virtual void RateLimitSharedMainThreadContext() OVERRIDE;
144 146
145 // cc::LayerTreeHostSingleThreadClient implementation. 147 // cc::LayerTreeHostSingleThreadClient implementation.
(...skipping 12 matching lines...) Expand all
158 160
159 bool send_v8_idle_notification_after_commit_; 161 bool send_v8_idle_notification_after_commit_;
160 base::TimeTicks begin_main_frame_time_; 162 base::TimeTicks begin_main_frame_time_;
161 // The time interval between BeginMainFrame calls, provided by the scheduler. 163 // The time interval between BeginMainFrame calls, provided by the scheduler.
162 base::TimeDelta begin_main_frame_interval_; 164 base::TimeDelta begin_main_frame_interval_;
163 }; 165 };
164 166
165 } // namespace content 167 } // namespace content
166 168
167 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 169 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.h ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698