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

Side by Side Diff: ui/compositor/transform_recorder.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_recorder.cc ('k') | ui/compositor/transform_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 #ifndef UI_COMPOSITOR_TRANSFORM_RECORDER_H_ 5 #ifndef UI_COMPOSITOR_TRANSFORM_RECORDER_H_
6 #define UI_COMPOSITOR_TRANSFORM_RECORDER_H_ 6 #define UI_COMPOSITOR_TRANSFORM_RECORDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/compositor/compositor_export.h" 9 #include "ui/compositor/compositor_export.h"
10 #include "ui/gfx/geometry/rect.h"
10 11
11 namespace cc { 12 namespace cc {
12 class DisplayItem; 13 class DisplayItem;
13 class DisplayItemList; 14 class DisplayItemList;
14 } 15 }
15 16
16 namespace gfx { 17 namespace gfx {
18 class Size;
17 class Transform; 19 class Transform;
18 } 20 }
19 21
20 namespace ui { 22 namespace ui {
21 class PaintContext; 23 class PaintContext;
22 24
23 // A class to provide scoped transforms of painting to a DisplayItemList. The 25 // A class to provide scoped transforms of painting to a DisplayItemList. The
24 // transform provided will be applied to any DisplayItems added to the 26 // transform provided will be applied to any DisplayItems added to the
25 // DisplayItemList while this object is alive. In other words, any nested 27 // DisplayItemList while this object is alive. In other words, any nested
26 // PaintRecorders or other TransformRecorders will be transformed. 28 // PaintRecorders or other TransformRecorders will be transformed.
27 class COMPOSITOR_EXPORT TransformRecorder { 29 class COMPOSITOR_EXPORT TransformRecorder {
28 public: 30 public:
29 explicit TransformRecorder(const PaintContext& context); 31 // |size_in_layer| is the size in layer space dimensions surrounding
32 // everything that's visible.
33 TransformRecorder(const PaintContext& context,
34 const gfx::Size& size_in_layer);
30 ~TransformRecorder(); 35 ~TransformRecorder();
31 36
32 void Transform(const gfx::Transform& transform); 37 void Transform(const gfx::Transform& transform);
33 38
34 private: 39 private:
35 const PaintContext& context_; 40 const PaintContext& context_;
41 const gfx::Rect bounds_in_layer_;
36 bool transformed_; 42 bool transformed_;
37 43
38 DISALLOW_COPY_AND_ASSIGN(TransformRecorder); 44 DISALLOW_COPY_AND_ASSIGN(TransformRecorder);
39 }; 45 };
40 46
41 } // namespace ui 47 } // namespace ui
42 48
43 #endif // UI_COMPOSITOR_TRANSFORM_RECORDER_H_ 49 #endif // UI_COMPOSITOR_TRANSFORM_RECORDER_H_
OLDNEW
« no previous file with comments | « ui/compositor/paint_recorder.cc ('k') | ui/compositor/transform_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698