| 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 <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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 virtual void willEndLiveResize() { | 164 virtual void willEndLiveResize() { |
| 165 } | 165 } |
| 166 | 166 |
| 167 virtual void animate(double frameBeginTime) { | 167 virtual void animate(double frameBeginTime) { |
| 168 } | 168 } |
| 169 | 169 |
| 170 virtual void layout() { | 170 virtual void layout() { |
| 171 } | 171 } |
| 172 | 172 |
| 173 virtual void paint(WebCanvas* canvas, const WebRect& rect, PaintOptions) { | |
| 174 if (!widget_->plugin()) | |
| 175 return; | |
| 176 | |
| 177 SkAutoCanvasRestore auto_restore(canvas, true); | |
| 178 float canvas_scale = widget_->deviceScaleFactor(); | |
| 179 canvas->scale(canvas_scale, canvas_scale); | |
| 180 | |
| 181 WebRect plugin_rect(0, 0, size_.width, size_.height); | |
| 182 widget_->plugin()->Paint(canvas, plugin_rect, rect); | |
| 183 } | |
| 184 | |
| 185 virtual void setCompositorSurfaceReady() { | 173 virtual void setCompositorSurfaceReady() { |
| 186 } | 174 } |
| 187 | 175 |
| 188 virtual void composite(bool finish) { | 176 virtual void composite(bool finish) { |
| 189 } | 177 } |
| 190 | 178 |
| 191 virtual void themeChanged() { | 179 virtual void themeChanged() { |
| 192 NOTIMPLEMENTED(); | 180 NOTIMPLEMENTED(); |
| 193 } | 181 } |
| 194 | 182 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 } | 461 } |
| 474 | 462 |
| 475 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( | 463 void RenderWidgetFullscreenPepper::SetDeviceScaleFactor( |
| 476 float device_scale_factor) { | 464 float device_scale_factor) { |
| 477 RenderWidget::SetDeviceScaleFactor(device_scale_factor); | 465 RenderWidget::SetDeviceScaleFactor(device_scale_factor); |
| 478 if (compositor_) | 466 if (compositor_) |
| 479 compositor_->setDeviceScaleFactor(device_scale_factor); | 467 compositor_->setDeviceScaleFactor(device_scale_factor); |
| 480 } | 468 } |
| 481 | 469 |
| 482 } // namespace content | 470 } // namespace content |
| OLD | NEW |