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

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 clip recorder params in omnibox. Created 5 years 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_cache.cc ('k') | ui/compositor/paint_context.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 #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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // don't want to expose them on this class so that people must go through the 73 // don't want to expose them on this class so that people must go through the
74 // recorders to access them. 74 // recorders to access them.
75 friend class ClipRecorder; 75 friend class ClipRecorder;
76 friend class CompositingRecorder; 76 friend class CompositingRecorder;
77 friend class PaintRecorder; 77 friend class PaintRecorder;
78 friend class TransformRecorder; 78 friend class TransformRecorder;
79 // The Cache class also needs to access the DisplayItemList to append its 79 // The Cache class also needs to access the DisplayItemList to append its
80 // cache contents. 80 // cache contents.
81 friend class PaintCache; 81 friend class PaintCache;
82 82
83 // Returns a rect with the given size in the space of the context's
84 // containing layer.
85 gfx::Rect ToLayerSpaceBounds(const gfx::Size& size_in_layer) const;
86
87 // Returns the given rect translated by the layer space offset.
88 gfx::Rect ToLayerSpaceRect(const gfx::Rect& rect) const;
89
83 cc::DisplayItemList* list_; 90 cc::DisplayItemList* list_;
84 scoped_ptr<SkPictureRecorder> owned_recorder_; 91 scoped_ptr<SkPictureRecorder> owned_recorder_;
85 // A pointer to the |owned_recorder_| in this PaintContext, or in another one 92 // A pointer to the |owned_recorder_| in this PaintContext, or in another one
86 // which this was copied from. We expect a copied-from PaintContext to outlive 93 // which this was copied from. We expect a copied-from PaintContext to outlive
87 // copies made from it. 94 // copies made from it.
88 SkPictureRecorder* recorder_; 95 SkPictureRecorder* recorder_;
89 // The device scale of the frame being painted. Used to determine which bitmap 96 // The device scale of the frame being painted. Used to determine which bitmap
90 // resources to use in the frame. 97 // resources to use in the frame.
91 float device_scale_factor_; 98 float device_scale_factor_;
92 // Invalidation in the space of the paint root (ie the space of the layer 99 // Invalidation in the space of the paint root (ie the space of the layer
(...skipping 11 matching lines...) Expand all
104 // recorder is active. 111 // recorder is active.
105 mutable bool inside_paint_recorder_; 112 mutable bool inside_paint_recorder_;
106 #endif 113 #endif
107 114
108 DISALLOW_COPY_AND_ASSIGN(PaintContext); 115 DISALLOW_COPY_AND_ASSIGN(PaintContext);
109 }; 116 };
110 117
111 } // namespace ui 118 } // namespace ui
112 119
113 #endif // UI_COMPOSITOR_PAINT_CONTEXT_H_ 120 #endif // UI_COMPOSITOR_PAINT_CONTEXT_H_
OLDNEW
« no previous file with comments | « ui/compositor/paint_cache.cc ('k') | ui/compositor/paint_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698