| OLD | NEW |
| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "content/common/gpu/client/gpu_channel_host.h" | 9 #include "content/common/gpu/client/gpu_channel_host.h" |
| 10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 400 |
| 401 // Call Close on the base class to destroy the WebWidget instance. | 401 // Call Close on the base class to destroy the WebWidget instance. |
| 402 RenderWidget::Close(); | 402 RenderWidget::Close(); |
| 403 } | 403 } |
| 404 | 404 |
| 405 webkit::ppapi::PluginInstance* | 405 webkit::ppapi::PluginInstance* |
| 406 RenderWidgetFullscreenPepper::GetBitmapForOptimizedPluginPaint( | 406 RenderWidgetFullscreenPepper::GetBitmapForOptimizedPluginPaint( |
| 407 const gfx::Rect& paint_bounds, | 407 const gfx::Rect& paint_bounds, |
| 408 TransportDIB** dib, | 408 TransportDIB** dib, |
| 409 gfx::Rect* location, | 409 gfx::Rect* location, |
| 410 gfx::Rect* clip) { | 410 gfx::Rect* clip, |
| 411 if (plugin_ && | 411 float* scale_factor) { |
| 412 plugin_->GetBitmapForOptimizedPluginPaint(paint_bounds, dib, | 412 if (plugin_ && plugin_->GetBitmapForOptimizedPluginPaint( |
| 413 location, clip)) | 413 paint_bounds, dib, location, clip, scale_factor)) { |
| 414 return plugin_; | 414 return plugin_; |
| 415 } |
| 415 return NULL; | 416 return NULL; |
| 416 } | 417 } |
| 417 | 418 |
| 418 void RenderWidgetFullscreenPepper::OnResize(const gfx::Size& size, | 419 void RenderWidgetFullscreenPepper::OnResize(const gfx::Size& size, |
| 419 const gfx::Rect& resizer_rect, | 420 const gfx::Rect& resizer_rect, |
| 420 bool is_fullscreen) { | 421 bool is_fullscreen) { |
| 421 if (context_) { | 422 if (context_) { |
| 422 gfx::Size pixel_size = size.Scale(deviceScaleFactor()); | 423 gfx::Size pixel_size = size.Scale(deviceScaleFactor()); |
| 423 context_->reshape(pixel_size.width(), pixel_size.height()); | 424 context_->reshape(pixel_size.width(), pixel_size.height()); |
| 424 context_->viewport(0, 0, pixel_size.width(), pixel_size.height()); | 425 context_->viewport(0, 0, pixel_size.width(), pixel_size.height()); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 | 580 |
| 580 WebGraphicsContext3DCommandBufferImpl* | 581 WebGraphicsContext3DCommandBufferImpl* |
| 581 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { | 582 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { |
| 582 if (!context_) { | 583 if (!context_) { |
| 583 CreateContext(); | 584 CreateContext(); |
| 584 } | 585 } |
| 585 if (!context_) | 586 if (!context_) |
| 586 return NULL; | 587 return NULL; |
| 587 return context_; | 588 return context_; |
| 588 } | 589 } |
| OLD | NEW |