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

Side by Side Diff: ui/compositor/compositing_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 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_COMPOSITING_RECORDER_H_ 5 #ifndef UI_COMPOSITOR_COMPOSITING_RECORDER_H_
6 #define UI_COMPOSITOR_COMPOSITING_RECORDER_H_ 6 #define UI_COMPOSITOR_COMPOSITING_RECORDER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/compositor/compositor_export.h" 10 #include "ui/compositor/compositor_export.h"
11 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/geometry/size.h"
danakj 2015/11/06 00:32:45 nit: forward declare size
11 13
12 namespace ui { 14 namespace ui {
13 class PaintContext; 15 class PaintContext;
14 16
15 // A class to provide scoped compositing filters (eg opacity) of painting to a 17 // A class to provide scoped compositing filters (eg opacity) of painting to a
16 // DisplayItemList. The filters provided will be applied to any 18 // DisplayItemList. The filters provided will be applied to any
17 // DisplayItems added to the DisplayItemList while this object is alive. In 19 // DisplayItems added to the DisplayItemList while this object is alive. In
18 // other words, any nested PaintRecorders or other such Recorders will 20 // other words, any nested PaintRecorders or other such Recorders will
19 // be filtered by the effect. 21 // be filtered by the effect.
20 class COMPOSITOR_EXPORT CompositingRecorder { 22 class COMPOSITOR_EXPORT CompositingRecorder {
21 public: 23 public:
22 // |alpha| is a value between 0 and 255, where 0 is transparent and 255 is 24 // |alpha| is a value between 0 and 255, where 0 is transparent and 255 is
23 // opaque. 25 // opaque. |visual_size| is the size of the bounding rect for painting.
danakj 2015/11/06 00:32:45 mention coordinate space of the layer? same q abou
wkorman 2015/11/16 19:01:03 Renamed to layer_size.
24 CompositingRecorder(const PaintContext& context, uint8_t alpha); 26 CompositingRecorder(const PaintContext& context,
27 const gfx::Size& visual_size,
28 uint8_t alpha);
25 ~CompositingRecorder(); 29 ~CompositingRecorder();
26 30
27 private: 31 private:
28 const PaintContext& context_; 32 const PaintContext& context_;
33 const gfx::Rect visual_rect_;
danakj 2015/11/06 00:32:45 How about storing the size, and convert to a rect
wkorman 2015/11/16 19:01:03 Discussed in person, let's try it this way, can tr
29 bool saved_; 34 bool saved_;
30 35
31 DISALLOW_COPY_AND_ASSIGN(CompositingRecorder); 36 DISALLOW_COPY_AND_ASSIGN(CompositingRecorder);
32 }; 37 };
33 38
34 } // namespace ui 39 } // namespace ui
35 40
36 #endif // UI_COMPOSITOR_CLIP_TRANSFORM_RECORDER_H_ 41 #endif // UI_COMPOSITOR_CLIP_TRANSFORM_RECORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698