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

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: Fetch device scale directly in RWVHBase 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_) {
526 // FIXME: Try using physical_backing_size here instead of manually
piman 2013/02/27 08:12:11 nit: style is TODO(aelias): I think you can do ju
527 // scaling by deviceScaleFactor.
525 gfx::Size pixel_size = gfx::ToFlooredSize( 528 gfx::Size pixel_size = gfx::ToFlooredSize(
526 gfx::ScaleSize(size, deviceScaleFactor())); 529 gfx::ScaleSize(size, deviceScaleFactor()));
527 context_->reshape(pixel_size.width(), pixel_size.height()); 530 context_->reshape(pixel_size.width(), pixel_size.height());
528 context_->viewport(0, 0, pixel_size.width(), pixel_size.height()); 531 context_->viewport(0, 0, pixel_size.width(), pixel_size.height());
529 } 532 }
530 RenderWidget::OnResize(size, resizer_rect, is_fullscreen); 533 RenderWidget::OnResize(size, physical_backing_size, resizer_rect,
534 is_fullscreen);
531 } 535 }
532 536
533 WebWidget* RenderWidgetFullscreenPepper::CreateWebWidget() { 537 WebWidget* RenderWidgetFullscreenPepper::CreateWebWidget() {
534 return new PepperWidget(this); 538 return new PepperWidget(this);
535 } 539 }
536 540
537 bool RenderWidgetFullscreenPepper::SupportsAsynchronousSwapBuffers() { 541 bool RenderWidgetFullscreenPepper::SupportsAsynchronousSwapBuffers() {
538 return context_ != NULL; 542 return context_ != NULL;
539 } 543 }
540 544
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { 709 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() {
706 if (!context_) { 710 if (!context_) {
707 CreateContext(); 711 CreateContext();
708 } 712 }
709 if (!context_) 713 if (!context_)
710 return NULL; 714 return NULL;
711 return context_; 715 return context_;
712 } 716 }
713 717
714 } // namespace content 718 } // 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