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

Unified Diff: content/renderer/render_widget.cc

Issue 12328080: Plumb physical backing size from RWHV to renderer CC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust for call renamed to GetViewportSizePix() Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/renderer/render_widget_fullscreen_pepper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index d4c3ac0cfd952ec8df8051347de27672e1e6dfd4..fa1900addeabd7fdbf3dff7e3f98b23ca07604dd 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -329,6 +329,7 @@ bool RenderWidget::Send(IPC::Message* message) {
}
void RenderWidget::Resize(const gfx::Size& new_size,
+ const gfx::Size& physical_backing_size,
const gfx::Rect& resizer_rect,
bool is_fullscreen,
ResizeAck resize_ack) {
@@ -340,7 +341,10 @@ void RenderWidget::Resize(const gfx::Size& new_size,
if (!webwidget_)
return;
- // Remember the rect where the resize corner will be drawn.
+ if (compositor_)
+ compositor_->setViewportSize(new_size, physical_backing_size);
+
+ physical_backing_size_ = physical_backing_size_;
resizer_rect_ = resizer_rect;
// NOTE: We may have entered fullscreen mode without changing our size.
@@ -414,9 +418,11 @@ void RenderWidget::OnCreatingNewAck() {
}
void RenderWidget::OnResize(const gfx::Size& new_size,
+ const gfx::Size& physical_backing_size,
const gfx::Rect& resizer_rect,
bool is_fullscreen) {
- Resize(new_size, resizer_rect, is_fullscreen, SEND_RESIZE_ACK);
+ Resize(new_size, physical_backing_size, resizer_rect, is_fullscreen,
+ SEND_RESIZE_ACK);
}
void RenderWidget::OnChangeResizeRect(const gfx::Rect& resizer_rect) {
@@ -1347,6 +1353,7 @@ void RenderWidget::initializeLayerTreeView(
return;
compositor_->setRootLayer(root_layer);
+ compositor_->setViewportSize(size_, physical_backing_size_);
if (init_complete_)
compositor_->setSurfaceReady();
}
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/renderer/render_widget_fullscreen_pepper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698