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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 // WebKit and filling the background (which can be slow) and just painting | 542 // WebKit and filling the background (which can be slow) and just painting |
543 // the plugin. Unlike the DoDeferredUpdate case, an extra copy is still | 543 // the plugin. Unlike the DoDeferredUpdate case, an extra copy is still |
544 // required. | 544 // required. |
545 optimized_instance->Paint(webkit_glue::ToWebCanvas(canvas), | 545 optimized_instance->Paint(webkit_glue::ToWebCanvas(canvas), |
546 optimized_copy_location, rect); | 546 optimized_copy_location, rect); |
547 } else { | 547 } else { |
548 // Normal painting case. | 548 // Normal painting case. |
549 webwidget_->paint(webkit_glue::ToWebCanvas(canvas), rect); | 549 webwidget_->paint(webkit_glue::ToWebCanvas(canvas), rect); |
550 | 550 |
551 // Flush to underlying bitmap. TODO(darin): is this needed? | 551 // Flush to underlying bitmap. TODO(darin): is this needed? |
552 canvas->getTopPlatformDevice().accessBitmap(false); | 552 skia::GetTopDevice(*canvas)->accessBitmap(false); |
553 } | 553 } |
554 | 554 |
555 PaintDebugBorder(rect, canvas); | 555 PaintDebugBorder(rect, canvas); |
556 canvas->restore(); | 556 canvas->restore(); |
557 } | 557 } |
558 | 558 |
559 void RenderWidget::PaintDebugBorder(const gfx::Rect& rect, | 559 void RenderWidget::PaintDebugBorder(const gfx::Rect& rect, |
560 skia::PlatformCanvas* canvas) { | 560 skia::PlatformCanvas* canvas) { |
561 static bool kPaintBorder = | 561 static bool kPaintBorder = |
562 CommandLine::ForCurrentProcess()->HasSwitch(switches::kShowPaintRects); | 562 CommandLine::ForCurrentProcess()->HasSwitch(switches::kShowPaintRects); |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1306 | 1306 |
1307 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 1307 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
1308 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 1308 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
1309 i != plugin_window_moves_.end(); ++i) { | 1309 i != plugin_window_moves_.end(); ++i) { |
1310 if (i->window == window) { | 1310 if (i->window == window) { |
1311 plugin_window_moves_.erase(i); | 1311 plugin_window_moves_.erase(i); |
1312 break; | 1312 break; |
1313 } | 1313 } |
1314 } | 1314 } |
1315 } | 1315 } |
OLD | NEW |