OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/render_widget.h" | 5 #include "chrome/renderer/render_widget.h" |
6 | 6 |
7 #include "app/surface/transport_dib.h" | 7 #include "app/surface/transport_dib.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 498 |
499 // We may get back a smaller canvas than we asked for. | 499 // We may get back a smaller canvas than we asked for. |
500 // TODO(darin): This seems like it could cause painting problems! | 500 // TODO(darin): This seems like it could cause painting problems! |
501 DCHECK_EQ(bounds.width(), canvas->getDevice()->width()); | 501 DCHECK_EQ(bounds.width(), canvas->getDevice()->width()); |
502 DCHECK_EQ(bounds.height(), canvas->getDevice()->height()); | 502 DCHECK_EQ(bounds.height(), canvas->getDevice()->height()); |
503 bounds.set_width(canvas->getDevice()->width()); | 503 bounds.set_width(canvas->getDevice()->width()); |
504 bounds.set_height(canvas->getDevice()->height()); | 504 bounds.set_height(canvas->getDevice()->height()); |
505 | 505 |
506 HISTOGRAM_COUNTS_100("MPArch.RW_PaintRectCount", update.paint_rects.size()); | 506 HISTOGRAM_COUNTS_100("MPArch.RW_PaintRectCount", update.paint_rects.size()); |
507 | 507 |
508 // TODO(darin): Re-enable painting multiple damage rects once the | |
509 // page-cycler regressions are resolved. See bug 29589. | |
510 if (update.scroll_rect.IsEmpty()) { | |
511 update.paint_rects.clear(); | |
512 update.paint_rects.push_back(bounds); | |
513 } | |
514 | |
515 // The scroll damage is just another rectangle to paint and copy. | 508 // The scroll damage is just another rectangle to paint and copy. |
516 copy_rects.swap(update.paint_rects); | 509 copy_rects.swap(update.paint_rects); |
517 if (!scroll_damage.IsEmpty()) | 510 if (!scroll_damage.IsEmpty()) |
518 copy_rects.push_back(scroll_damage); | 511 copy_rects.push_back(scroll_damage); |
519 | 512 |
520 for (size_t i = 0; i < copy_rects.size(); ++i) | 513 for (size_t i = 0; i < copy_rects.size(); ++i) |
521 PaintRect(copy_rects[i], bounds.origin(), canvas.get()); | 514 PaintRect(copy_rects[i], bounds.origin(), canvas.get()); |
522 | 515 |
523 dib_id = current_paint_buf_->id(); | 516 dib_id = current_paint_buf_->id(); |
524 } else { // Accelerated compositing path | 517 } else { // Accelerated compositing path |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 | 974 |
982 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 975 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
983 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 976 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
984 i != plugin_window_moves_.end(); ++i) { | 977 i != plugin_window_moves_.end(); ++i) { |
985 if (i->window == window) { | 978 if (i->window == window) { |
986 plugin_window_moves_.erase(i); | 979 plugin_window_moves_.erase(i); |
987 break; | 980 break; |
988 } | 981 } |
989 } | 982 } |
990 } | 983 } |
OLD | NEW |