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

Side by Side Diff: ui/compositor/paint_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_PAINT_RECORDER_H_ 5 #ifndef UI_COMPOSITOR_PAINT_RECORDER_H_
6 #define UI_COMPOSITOR_PAINT_RECORDER_H_ 6 #define UI_COMPOSITOR_PAINT_RECORDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "skia/ext/refptr.h" 10 #include "skia/ext/refptr.h"
11 #include "ui/compositor/compositor_export.h" 11 #include "ui/compositor/compositor_export.h"
12 #include "ui/gfx/canvas.h" 12 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/geometry/rect.h"
13 14
14 namespace cc { 15 namespace cc {
15 class DisplayItemList; 16 class DisplayItemList;
16 } 17 }
17 18
18 namespace gfx { 19 namespace gfx {
19 class Canvas; 20 class Canvas;
20 } 21 }
21 22
22 class SkCanvas; 23 class SkCanvas;
(...skipping 17 matching lines...) Expand all
40 PaintRecorder(const PaintContext& context, const gfx::Size& recording_size); 41 PaintRecorder(const PaintContext& context, const gfx::Size& recording_size);
41 ~PaintRecorder(); 42 ~PaintRecorder();
42 43
43 // Gets a gfx::Canvas for painting into. 44 // Gets a gfx::Canvas for painting into.
44 gfx::Canvas* canvas() { return &canvas_; } 45 gfx::Canvas* canvas() { return &canvas_; }
45 46
46 private: 47 private:
47 const PaintContext& context_; 48 const PaintContext& context_;
48 gfx::Canvas canvas_; 49 gfx::Canvas canvas_;
49 PaintCache* cache_; 50 PaintCache* cache_;
51 gfx::Rect visual_rect_;
50 52
51 DISALLOW_COPY_AND_ASSIGN(PaintRecorder); 53 DISALLOW_COPY_AND_ASSIGN(PaintRecorder);
52 }; 54 };
53 55
54 } // namespace ui 56 } // namespace ui
55 57
56 #endif // UI_COMPOSITOR_PAINT_RECORDER_H_ 58 #endif // UI_COMPOSITOR_PAINT_RECORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698