Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: content/renderer/render_widget.cc

Issue 11235017: Revert to old rect conversion behavior (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 // Only update the part of the plugin that actually changed. 979 // Only update the part of the plugin that actually changed.
980 optimized_copy_rect.Intersect(bounds); 980 optimized_copy_rect.Intersect(bounds);
981 pending_update_params_->bitmap = dib->id(); 981 pending_update_params_->bitmap = dib->id();
982 pending_update_params_->bitmap_rect = optimized_copy_location; 982 pending_update_params_->bitmap_rect = optimized_copy_location;
983 pending_update_params_->copy_rects.push_back(optimized_copy_rect); 983 pending_update_params_->copy_rects.push_back(optimized_copy_rect);
984 pending_update_params_->scale_factor = dib_scale_factor; 984 pending_update_params_->scale_factor = dib_scale_factor;
985 } else if (!is_accelerated_compositing_active_) { 985 } else if (!is_accelerated_compositing_active_) {
986 // Compute a buffer for painting and cache it. 986 // Compute a buffer for painting and cache it.
987 gfx::RectF scaled_bounds = bounds; 987 gfx::RectF scaled_bounds = bounds;
988 scaled_bounds.Scale(device_scale_factor_); 988 scaled_bounds.Scale(device_scale_factor_);
989 gfx::Rect pixel_bounds = gfx::ToEnclosingRect(scaled_bounds); 989 gfx::Rect pixel_bounds =
990 gfx::ToFlooredRectDeprecated(scaled_bounds);
990 scoped_ptr<skia::PlatformCanvas> canvas( 991 scoped_ptr<skia::PlatformCanvas> canvas(
991 RenderProcess::current()->GetDrawingCanvas(&current_paint_buf_, 992 RenderProcess::current()->GetDrawingCanvas(&current_paint_buf_,
992 pixel_bounds)); 993 pixel_bounds));
993 if (!canvas.get()) { 994 if (!canvas.get()) {
994 NOTREACHED(); 995 NOTREACHED();
995 return; 996 return;
996 } 997 }
997 998
998 // We may get back a smaller canvas than we asked for. 999 // We may get back a smaller canvas than we asked for.
999 // TODO(darin): This seems like it could cause painting problems! 1000 // TODO(darin): This seems like it could cause painting problems!
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 1903
1903 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1904 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1904 return false; 1905 return false;
1905 } 1906 }
1906 1907
1907 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1908 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1908 return false; 1909 return false;
1909 } 1910 }
1910 1911
1911 } // namespace content 1912 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_backing_store.cc ('k') | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698