| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 // WebKit and filling the background (which can be slow) and just painting | 538 // WebKit and filling the background (which can be slow) and just painting |
| 539 // the plugin. Unlike the DoDeferredUpdate case, an extra copy is still | 539 // the plugin. Unlike the DoDeferredUpdate case, an extra copy is still |
| 540 // required. | 540 // required. |
| 541 optimized_instance->Paint(webkit_glue::ToWebCanvas(canvas), | 541 optimized_instance->Paint(webkit_glue::ToWebCanvas(canvas), |
| 542 optimized_copy_location, rect); | 542 optimized_copy_location, rect); |
| 543 } else { | 543 } else { |
| 544 // Normal painting case. | 544 // Normal painting case. |
| 545 webwidget_->paint(webkit_glue::ToWebCanvas(canvas), rect); | 545 webwidget_->paint(webkit_glue::ToWebCanvas(canvas), rect); |
| 546 | 546 |
| 547 // Flush to underlying bitmap. TODO(darin): is this needed? | 547 // Flush to underlying bitmap. TODO(darin): is this needed? |
| 548 canvas->getTopPlatformDevice().accessBitmap(false); | 548 canvas->getTopDevice().accessBitmap(false); |
| 549 } | 549 } |
| 550 | 550 |
| 551 PaintDebugBorder(rect, canvas); | 551 PaintDebugBorder(rect, canvas); |
| 552 canvas->restore(); | 552 canvas->restore(); |
| 553 } | 553 } |
| 554 | 554 |
| 555 void RenderWidget::PaintDebugBorder(const gfx::Rect& rect, | 555 void RenderWidget::PaintDebugBorder(const gfx::Rect& rect, |
| 556 skia::PlatformCanvas* canvas) { | 556 skia::PlatformCanvas* canvas) { |
| 557 static bool kPaintBorder = | 557 static bool kPaintBorder = |
| 558 CommandLine::ForCurrentProcess()->HasSwitch(switches::kShowPaintRects); | 558 CommandLine::ForCurrentProcess()->HasSwitch(switches::kShowPaintRects); |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 | 1292 |
| 1293 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 1293 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
| 1294 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 1294 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
| 1295 i != plugin_window_moves_.end(); ++i) { | 1295 i != plugin_window_moves_.end(); ++i) { |
| 1296 if (i->window == window) { | 1296 if (i->window == window) { |
| 1297 plugin_window_moves_.erase(i); | 1297 plugin_window_moves_.erase(i); |
| 1298 break; | 1298 break; |
| 1299 } | 1299 } |
| 1300 } | 1300 } |
| 1301 } | 1301 } |
| OLD | NEW |