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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 10821054: Aura: Compensate for round-off error in damage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and clip. Created 8 years, 4 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 image_transport_clients_[params_in_pixel.surface_handle]->size(); 704 image_transport_clients_[params_in_pixel.surface_handle]->size();
705 705
706 // Co-ordinates come in OpenGL co-ordinate space. 706 // Co-ordinates come in OpenGL co-ordinate space.
707 // We need to convert to layer space. 707 // We need to convert to layer space.
708 gfx::Rect rect_to_paint = ConvertRectToDIP(this, gfx::Rect( 708 gfx::Rect rect_to_paint = ConvertRectToDIP(this, gfx::Rect(
709 params_in_pixel.x, 709 params_in_pixel.x,
710 surface_size_in_pixel.height() - params_in_pixel.y - 710 surface_size_in_pixel.height() - params_in_pixel.y -
711 params_in_pixel.height, 711 params_in_pixel.height,
712 params_in_pixel.width, 712 params_in_pixel.width,
713 params_in_pixel.height)); 713 params_in_pixel.height));
714
715 // Damage may not have been DIP aligned, so inflate damage to compensate
716 // for any round-off error.
717 rect_to_paint.Inset(-1, -1);
718 rect_to_paint.Intersect(window_->bounds());
719
714 window_->SchedulePaintInRect(rect_to_paint); 720 window_->SchedulePaintInRect(rect_to_paint);
715 721
716 if (!resize_locks_.empty()) { 722 if (!resize_locks_.empty()) {
717 // If we are waiting for the resize, fast-track the ACK. 723 // If we are waiting for the resize, fast-track the ACK.
718 if (compositor->IsThreaded()) { 724 if (compositor->IsThreaded()) {
719 // We need the compositor thread to pick up the active buffer before 725 // We need the compositor thread to pick up the active buffer before
720 // ACKing. 726 // ACKing.
721 on_compositing_did_commit_callbacks_.push_back( 727 on_compositing_did_commit_callbacks_.push_back(
722 base::Bind(&RenderWidgetHostViewAura::InsertSyncPointAndACK, 728 base::Bind(&RenderWidgetHostViewAura::InsertSyncPointAndACK,
723 params_in_pixel.route_id, 729 params_in_pixel.route_id,
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 RenderWidgetHost* widget) { 1648 RenderWidgetHost* widget) {
1643 return new RenderWidgetHostViewAura(widget); 1649 return new RenderWidgetHostViewAura(widget);
1644 } 1650 }
1645 1651
1646 // static 1652 // static
1647 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 1653 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
1648 GetScreenInfoForWindow(results, NULL); 1654 GetScreenInfoForWindow(results, NULL);
1649 } 1655 }
1650 1656
1651 } // namespace content 1657 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698