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

Side by Side Diff: ui/compositor/paint_context.cc

Issue 1423653005: Further plumb visual rect into cc:DisplayItemList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cc unit tests. Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/compositor/paint_context.h" 5 #include "ui/compositor/paint_context.h"
6 6
7 #include "third_party/skia/include/core/SkPictureRecorder.h" 7 #include "third_party/skia/include/core/SkPictureRecorder.h"
8 #include "ui/gfx/canvas.h" 8 #include "ui/gfx/canvas.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 offset_(other.offset_) { 47 offset_(other.offset_) {
48 #if DCHECK_IS_ON() 48 #if DCHECK_IS_ON()
49 root_visited_ = other.root_visited_; 49 root_visited_ = other.root_visited_;
50 inside_paint_recorder_ = other.inside_paint_recorder_; 50 inside_paint_recorder_ = other.inside_paint_recorder_;
51 #endif 51 #endif
52 } 52 }
53 53
54 PaintContext::~PaintContext() { 54 PaintContext::~PaintContext() {
55 } 55 }
56 56
57 gfx::Rect PaintContext::ToVisualRect(const gfx::Size& visual_size) const {
58 return gfx::Rect(gfx::Point(offset_.x(), offset_.y()), visual_size);
danakj 2015/11/06 00:32:45 nit: return gfx::Rect(visual_size) + offset_ ?
wkorman 2015/11/16 19:01:03 Done.
59 }
60
57 } // namespace ui 61 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698