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

Side by Side Diff: content/renderer/render_widget_fullscreen_pepper.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, 9 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
« no previous file with comments | « content/renderer/render_widget_fullscreen_pepper.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/renderer/render_widget_fullscreen_pepper.h" 5 #include "content/renderer/render_widget_fullscreen_pepper.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 gfx::Rect* clip, 512 gfx::Rect* clip,
513 float* scale_factor) { 513 float* scale_factor) {
514 if (plugin_ && plugin_->GetBitmapForOptimizedPluginPaint( 514 if (plugin_ && plugin_->GetBitmapForOptimizedPluginPaint(
515 paint_bounds, dib, location, clip, scale_factor)) { 515 paint_bounds, dib, location, clip, scale_factor)) {
516 return plugin_; 516 return plugin_;
517 } 517 }
518 return NULL; 518 return NULL;
519 } 519 }
520 520
521 void RenderWidgetFullscreenPepper::OnResize(const gfx::Size& size, 521 void RenderWidgetFullscreenPepper::OnResize(const gfx::Size& size,
522 const gfx::Rect& resizer_rect, 522 const gfx::Size& physical_backing_size,
523 bool is_fullscreen) { 523 const gfx::Rect& resizer_rect,
524 bool is_fullscreen) {
524 if (context_) { 525 if (context_) {
525 gfx::Size pixel_size = gfx::ToFlooredSize( 526 context_->reshape(physical_backing_size.width(),
526 gfx::ScaleSize(size, deviceScaleFactor())); 527 physical_backing_size.height());
527 context_->reshape(pixel_size.width(), pixel_size.height()); 528 context_->viewport(0, 0,
528 context_->viewport(0, 0, pixel_size.width(), pixel_size.height()); 529 physical_backing_size.width(),
530 physical_backing_size.height());
529 } 531 }
530 RenderWidget::OnResize(size, resizer_rect, is_fullscreen); 532 RenderWidget::OnResize(size, physical_backing_size, resizer_rect,
533 is_fullscreen);
531 } 534 }
532 535
533 WebWidget* RenderWidgetFullscreenPepper::CreateWebWidget() { 536 WebWidget* RenderWidgetFullscreenPepper::CreateWebWidget() {
534 return new PepperWidget(this); 537 return new PepperWidget(this);
535 } 538 }
536 539
537 bool RenderWidgetFullscreenPepper::SupportsAsynchronousSwapBuffers() { 540 bool RenderWidgetFullscreenPepper::SupportsAsynchronousSwapBuffers() {
538 return context_ != NULL; 541 return context_ != NULL;
539 } 542 }
540 543
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { 708 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() {
706 if (!context_) { 709 if (!context_) {
707 CreateContext(); 710 CreateContext();
708 } 711 }
709 if (!context_) 712 if (!context_)
710 return NULL; 713 return NULL;
711 return context_; 714 return context_;
712 } 715 }
713 716
714 } // namespace content 717 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget_fullscreen_pepper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698