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

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

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 #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 "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/compositor/compositor_export.h" 10 #include "ui/compositor/compositor_export.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // 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
72 // 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
73 // recorders to access them. 73 // recorders to access them.
74 friend class ClipTransformRecorder; 74 friend class ClipTransformRecorder;
75 friend class CompositingRecorder; 75 friend class CompositingRecorder;
76 friend class PaintRecorder; 76 friend class PaintRecorder;
77 // The Cache class also needs to access the DisplayItemList to append its 77 // The Cache class also needs to access the DisplayItemList to append its
78 // cache contents. 78 // cache contents.
79 friend class PaintCache; 79 friend class PaintCache;
80 80
81 // Returns a rect with the given size in the space of the context's
82 // containing layer.
83 gfx::Rect ToVisualRect(const gfx::Size& visual_size) const;
wkorman 2015/11/16 19:01:03 Renamed to ToLayerSpaceBounds.
84
81 cc::DisplayItemList* list_; 85 cc::DisplayItemList* list_;
82 scoped_ptr<SkPictureRecorder> owned_recorder_; 86 scoped_ptr<SkPictureRecorder> owned_recorder_;
83 // A pointer to the |owned_recorder_| in this PaintContext, or in another one 87 // A pointer to the |owned_recorder_| in this PaintContext, or in another one
84 // which this was copied from. We expect a copied-from PaintContext to outlive 88 // which this was copied from. We expect a copied-from PaintContext to outlive
85 // copies made from it. 89 // copies made from it.
86 SkPictureRecorder* recorder_; 90 SkPictureRecorder* recorder_;
87 // The device scale of the frame being painted. Used to determine which bitmap 91 // The device scale of the frame being painted. Used to determine which bitmap
88 // resources to use in the frame. 92 // resources to use in the frame.
89 float device_scale_factor_; 93 float device_scale_factor_;
90 // Invalidation in the space of the paint root (ie the space of the layer 94 // Invalidation in the space of the paint root (ie the space of the layer
(...skipping 11 matching lines...) Expand all
102 // recorder is active. 106 // recorder is active.
103 mutable bool inside_paint_recorder_; 107 mutable bool inside_paint_recorder_;
104 #endif 108 #endif
105 109
106 DISALLOW_COPY_AND_ASSIGN(PaintContext); 110 DISALLOW_COPY_AND_ASSIGN(PaintContext);
107 }; 111 };
108 112
109 } // namespace ui 113 } // namespace ui
110 114
111 #endif // UI_COMPOSITOR_PAINT_CONTEXT_H_ 115 #endif // UI_COMPOSITOR_PAINT_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698