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

Unified Diff: ui/views/controls/tree/tree_view_views.cc

Issue 11275089: SkRect to gfx::Rect type conversions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove unnecessary lines Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/tree/tree_view_views.cc
diff --git a/ui/views/controls/tree/tree_view_views.cc b/ui/views/controls/tree/tree_view_views.cc
index 865918061a276650b8ba630df00ab7222cfa0c8b..910183606235ecdcef0962f4ef812bc6bef61fe5 100644
--- a/ui/views/controls/tree/tree_view_views.cc
+++ b/ui/views/controls/tree/tree_view_views.cc
@@ -16,6 +16,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image.h"
+#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/skia_util.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
@@ -517,7 +518,8 @@ void TreeView::OnPaint(gfx::Canvas* canvas) {
{
SkRect sk_clip_rect;
if (canvas->sk_canvas()->getClipBounds(&sk_clip_rect)) {
- gfx::Rect clip_rect = gfx::SkRectToRect(sk_clip_rect);
+ gfx::Rect clip_rect = gfx::ToFlooredRectDeprecated(
+ gfx::SkRectToRectF(sk_clip_rect));
sky 2012/11/01 16:10:24 Why does this need to use RectF and then floor it?
danakj 2012/11/01 17:38:27 This is trying to paint everything touched by the
danakj 2012/11/01 17:48:28 The clip rect given by skia is a float rect, but w
danakj 2012/11/01 17:50:18 I guess my question is why we use getClipBounds()
min_y = clip_rect.y();
max_y = clip_rect.bottom();
} else {
« ui/views/controls/table/table_view_views.cc ('K') | « ui/views/controls/table/table_view_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698