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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PaintRecordBuilder.h

Issue 2784373004: [SPv2] Replay DragImages into PropertyTreeState of the enclosing stacking context (Closed)
Patch Set: Created 3 years, 8 months 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 PaintRecordBuilder_h 5 #ifndef PaintRecordBuilder_h
6 #define PaintRecordBuilder_h 6 #define PaintRecordBuilder_h
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "platform/PlatformExport.h" 10 #include "platform/PlatformExport.h"
11 #include "platform/geometry/FloatRect.h" 11 #include "platform/geometry/FloatRect.h"
12 #include "platform/graphics/paint/DisplayItemClient.h" 12 #include "platform/graphics/paint/DisplayItemClient.h"
13 #include "platform/graphics/paint/PaintRecord.h" 13 #include "platform/graphics/paint/PaintRecord.h"
14 #include "platform/graphics/paint/PropertyTreeState.h"
14 #include "third_party/skia/include/core/SkRefCnt.h" 15 #include "third_party/skia/include/core/SkRefCnt.h"
15 #include "wtf/Noncopyable.h" 16 #include "wtf/Noncopyable.h"
16 17
17 class SkMetaData; 18 class SkMetaData;
18 19
19 namespace blink { 20 namespace blink {
20 21
21 class GraphicsContext; 22 class GraphicsContext;
22 class PaintController; 23 class PaintController;
23 24
(...skipping 19 matching lines...) Expand all
43 SkMetaData* = nullptr, 44 SkMetaData* = nullptr,
44 GraphicsContext* containingContext = nullptr, 45 GraphicsContext* containingContext = nullptr,
45 PaintController* = nullptr); 46 PaintController* = nullptr);
46 ~PaintRecordBuilder(); 47 ~PaintRecordBuilder();
47 48
48 GraphicsContext& context() { return *m_context; } 49 GraphicsContext& context() { return *m_context; }
49 50
50 // Returns a PaintRecord capturing all drawing performed on the builder's 51 // Returns a PaintRecord capturing all drawing performed on the builder's
51 // context since construction. If SPv2 is on, flattens all paint chunks 52 // context since construction. If SPv2 is on, flattens all paint chunks
52 // into PropertyTreeState::root() space. 53 // into PropertyTreeState::root() space.
53 sk_sp<PaintRecord> endRecording(); 54 // In SPv2 mode, replayes into the ancestor state given by |replayState|.
wkorman 2017/03/31 18:21:51 Param has different name (and only in .cpp file) h
wkorman 2017/03/31 18:21:51 replays
chrishtr 2017/03/31 20:59:03 Fixed
55 sk_sp<PaintRecord> endRecording(
56 const PropertyTreeState& = PropertyTreeState::root());
54 57
55 // DisplayItemClient methods 58 // DisplayItemClient methods
56 String debugName() const final { return "PaintRecordBuilder"; } 59 String debugName() const final { return "PaintRecordBuilder"; }
57 LayoutRect visualRect() const final { return LayoutRect(); } 60 LayoutRect visualRect() const final { return LayoutRect(); }
58 61
59 private: 62 private:
60 PaintController* m_paintController; 63 PaintController* m_paintController;
61 std::unique_ptr<PaintController> m_paintControllerPtr; 64 std::unique_ptr<PaintController> m_paintControllerPtr;
62 std::unique_ptr<GraphicsContext> m_context; 65 std::unique_ptr<GraphicsContext> m_context;
63 FloatRect m_bounds; 66 FloatRect m_bounds;
64 }; 67 };
65 68
66 } // namespace blink 69 } // namespace blink
67 70
68 #endif // PaintRecordBuilder_h 71 #endif // PaintRecordBuilder_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698