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

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

Issue 2694023003: Make CanvasPainter raster directly to an SkBitmap (Closed)
Patch Set: Replace CanvasPainter rect with size 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
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 #ifndef UI_COMPOSITOR_PAINT_CONTEXT_H_ 5 #ifndef UI_COMPOSITOR_PAINT_CONTEXT_H_
6 #define UI_COMPOSITOR_PAINT_CONTEXT_H_ 6 #define UI_COMPOSITOR_PAINT_CONTEXT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void Visited(void* visited) const { 58 void Visited(void* visited) const {
59 if (!root_visited_) 59 if (!root_visited_)
60 root_visited_ = visited; 60 root_visited_ = visited;
61 } 61 }
62 void* RootVisited() const { return root_visited_; } 62 void* RootVisited() const { return root_visited_; }
63 const gfx::Vector2d& PaintOffset() const { return offset_; } 63 const gfx::Vector2d& PaintOffset() const { return offset_; }
64 #endif 64 #endif
65 65
66 const gfx::Rect& InvalidationForTesting() const { return invalidation_; } 66 const gfx::Rect& InvalidationForTesting() const { return invalidation_; }
67 67
68 float device_scale_factor() const { return device_scale_factor_; }
danakj 2017/02/14 21:37:26 It doesn't look like you need to add this if u sto
69
68 private: 70 private:
69 // The Recorder classes need access to the internal canvas and friends, but we 71 // The Recorder classes need access to the internal canvas and friends, but we
70 // don't want to expose them on this class so that people must go through the 72 // don't want to expose them on this class so that people must go through the
71 // recorders to access them. 73 // recorders to access them.
72 friend class ClipRecorder; 74 friend class ClipRecorder;
73 friend class CompositingRecorder; 75 friend class CompositingRecorder;
74 friend class PaintRecorder; 76 friend class PaintRecorder;
75 friend class TransformRecorder; 77 friend class TransformRecorder;
76 // The Cache class also needs to access the DisplayItemList to append its 78 // The Cache class also needs to access the DisplayItemList to append its
77 // cache contents. 79 // cache contents.
(...skipping 30 matching lines...) Expand all
108 // recorder is active. 110 // recorder is active.
109 mutable bool inside_paint_recorder_; 111 mutable bool inside_paint_recorder_;
110 #endif 112 #endif
111 113
112 DISALLOW_COPY_AND_ASSIGN(PaintContext); 114 DISALLOW_COPY_AND_ASSIGN(PaintContext);
113 }; 115 };
114 116
115 } // namespace ui 117 } // namespace ui
116 118
117 #endif // UI_COMPOSITOR_PAINT_CONTEXT_H_ 119 #endif // UI_COMPOSITOR_PAINT_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698