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

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

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 10 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
« no previous file with comments | « ui/compositor/paint_context.h ('k') | ui/compositor/paint_recorder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
8 #include "ui/gfx/canvas.h" 7 #include "ui/gfx/canvas.h"
9 8
10 namespace ui { 9 namespace ui {
11 10
12 PaintContext::PaintContext(cc::DisplayItemList* list, 11 PaintContext::PaintContext(cc::DisplayItemList* list,
13 float device_scale_factor, 12 float device_scale_factor,
14 const gfx::Rect& invalidation) 13 const gfx::Rect& invalidation)
15 : list_(list), 14 : list_(list),
16 owned_recorder_(new SkPictureRecorder), 15 owned_recorder_(new cc::PaintRecorder),
17 recorder_(owned_recorder_.get()), 16 recorder_(owned_recorder_.get()),
18 device_scale_factor_(device_scale_factor), 17 device_scale_factor_(device_scale_factor),
19 invalidation_(invalidation) { 18 invalidation_(invalidation) {
20 #if DCHECK_IS_ON() 19 #if DCHECK_IS_ON()
21 root_visited_ = nullptr; 20 root_visited_ = nullptr;
22 inside_paint_recorder_ = false; 21 inside_paint_recorder_ = false;
23 #endif 22 #endif
24 } 23 }
25 24
26 PaintContext::PaintContext(const PaintContext& other, 25 PaintContext::PaintContext(const PaintContext& other,
(...skipping 30 matching lines...) Expand all
57 gfx::Rect PaintContext::ToLayerSpaceBounds( 56 gfx::Rect PaintContext::ToLayerSpaceBounds(
58 const gfx::Size& size_in_context) const { 57 const gfx::Size& size_in_context) const {
59 return gfx::Rect(size_in_context) + offset_; 58 return gfx::Rect(size_in_context) + offset_;
60 } 59 }
61 60
62 gfx::Rect PaintContext::ToLayerSpaceRect(const gfx::Rect& rect) const { 61 gfx::Rect PaintContext::ToLayerSpaceRect(const gfx::Rect& rect) const {
63 return rect + offset_; 62 return rect + offset_;
64 } 63 }
65 64
66 } // namespace ui 65 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/paint_context.h ('k') | ui/compositor/paint_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698