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

Side by Side Diff: third_party/WebKit/Source/platform/testing/TestPaintArtifact.cpp

Issue 2299533002: WIP: Construct SPV2's scroll paint property tree (Closed)
Patch Set: Add more paint property builder tests, update comments/documentation" Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/platform/testing/TestPaintArtifact.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "platform/testing/TestPaintArtifact.h" 5 #include "platform/testing/TestPaintArtifact.h"
6 6
7 #include "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "platform/graphics/paint/DisplayItemClient.h" 8 #include "platform/graphics/paint/DisplayItemClient.h"
9 #include "platform/graphics/paint/DrawingDisplayItem.h" 9 #include "platform/graphics/paint/DrawingDisplayItem.h"
10 #include "platform/graphics/paint/ForeignLayerDisplayItem.h" 10 #include "platform/graphics/paint/ForeignLayerDisplayItem.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 { 46 {
47 } 47 }
48 48
49 TestPaintArtifact::~TestPaintArtifact() 49 TestPaintArtifact::~TestPaintArtifact()
50 { 50 {
51 } 51 }
52 52
53 TestPaintArtifact& TestPaintArtifact::chunk( 53 TestPaintArtifact& TestPaintArtifact::chunk(
54 PassRefPtr<TransformPaintPropertyNode> transform, 54 PassRefPtr<TransformPaintPropertyNode> transform,
55 PassRefPtr<ClipPaintPropertyNode> clip, 55 PassRefPtr<ClipPaintPropertyNode> clip,
56 PassRefPtr<EffectPaintPropertyNode> effect) 56 PassRefPtr<EffectPaintPropertyNode> effect,
57 PassRefPtr<ScrollPaintPropertyNode> scroll)
57 { 58 {
58 PaintChunkProperties properties; 59 PaintChunkProperties properties;
59 properties.transform = transform; 60 properties.transform = transform;
60 properties.clip = clip; 61 properties.clip = clip;
61 properties.effect = effect; 62 properties.effect = effect;
63 properties.scroll = scroll;
62 return chunk(properties); 64 return chunk(properties);
63 } 65 }
64 66
65 TestPaintArtifact& TestPaintArtifact::chunk(const PaintChunkProperties& properti es) 67 TestPaintArtifact& TestPaintArtifact::chunk(const PaintChunkProperties& properti es)
66 { 68 {
67 if (!m_paintChunks.isEmpty()) 69 if (!m_paintChunks.isEmpty())
68 m_paintChunks.last().endIndex = m_displayItemList.size(); 70 m_paintChunks.last().endIndex = m_displayItemList.size();
69 PaintChunk chunk; 71 PaintChunk chunk;
70 chunk.beginIndex = m_displayItemList.size(); 72 chunk.beginIndex = m_displayItemList.size();
71 chunk.properties = properties; 73 chunk.properties = properties;
(...skipping 26 matching lines...) Expand all
98 return m_paintArtifact; 100 return m_paintArtifact;
99 101
100 if (!m_paintChunks.isEmpty()) 102 if (!m_paintChunks.isEmpty())
101 m_paintChunks.last().endIndex = m_displayItemList.size(); 103 m_paintChunks.last().endIndex = m_displayItemList.size();
102 m_paintArtifact = PaintArtifact(std::move(m_displayItemList), std::move(m_pa intChunks), true); 104 m_paintArtifact = PaintArtifact(std::move(m_displayItemList), std::move(m_pa intChunks), true);
103 m_built = true; 105 m_built = true;
104 return m_paintArtifact; 106 return m_paintArtifact;
105 } 107 }
106 108
107 } // namespace blink 109 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/testing/TestPaintArtifact.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698