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

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

Issue 2657863004: Move scroll paint property nodes to be owned by the transform tree (Closed)
Patch Set: Rebase & remove parens Created 3 years, 10 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 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 30 matching lines...) Expand all
41 paint.setColor(m_color.rgb()); 41 paint.setColor(m_color.rgb());
42 canvas->drawRect(m_rect, paint); 42 canvas->drawRect(m_rect, paint);
43 return recorder.finishRecordingAsPicture(); 43 return recorder.finishRecordingAsPicture();
44 } 44 }
45 45
46 TestPaintArtifact::TestPaintArtifact() : m_displayItemList(0), m_built(false) {} 46 TestPaintArtifact::TestPaintArtifact() : m_displayItemList(0), m_built(false) {}
47 47
48 TestPaintArtifact::~TestPaintArtifact() {} 48 TestPaintArtifact::~TestPaintArtifact() {}
49 49
50 TestPaintArtifact& TestPaintArtifact::chunk( 50 TestPaintArtifact& TestPaintArtifact::chunk(
51 PassRefPtr<TransformPaintPropertyNode> transform, 51 PassRefPtr<const TransformPaintPropertyNode> transform,
52 PassRefPtr<ClipPaintPropertyNode> clip, 52 PassRefPtr<const ClipPaintPropertyNode> clip,
53 PassRefPtr<EffectPaintPropertyNode> effect, 53 PassRefPtr<const EffectPaintPropertyNode> effect) {
54 PassRefPtr<ScrollPaintPropertyNode> scroll) { 54 PropertyTreeState propertyTreeState(transform.get(), clip.get(),
55 PropertyTreeState propertyTreeState(transform.get(), clip.get(), effect.get(), 55 effect.get());
56 scroll.get());
57 PaintChunkProperties properties(propertyTreeState); 56 PaintChunkProperties properties(propertyTreeState);
58 return chunk(properties); 57 return chunk(properties);
59 } 58 }
60 59
61 TestPaintArtifact& TestPaintArtifact::chunk( 60 TestPaintArtifact& TestPaintArtifact::chunk(
62 const PaintChunkProperties& properties) { 61 const PaintChunkProperties& properties) {
63 if (!m_paintChunks.isEmpty()) 62 if (!m_paintChunks.isEmpty())
64 m_paintChunks.back().endIndex = m_displayItemList.size(); 63 m_paintChunks.back().endIndex = m_displayItemList.size();
65 PaintChunk chunk; 64 PaintChunk chunk;
66 chunk.beginIndex = m_displayItemList.size(); 65 chunk.beginIndex = m_displayItemList.size();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 98
100 if (!m_paintChunks.isEmpty()) 99 if (!m_paintChunks.isEmpty())
101 m_paintChunks.back().endIndex = m_displayItemList.size(); 100 m_paintChunks.back().endIndex = m_displayItemList.size();
102 m_paintArtifact = PaintArtifact(std::move(m_displayItemList), 101 m_paintArtifact = PaintArtifact(std::move(m_displayItemList),
103 std::move(m_paintChunks), true); 102 std::move(m_paintChunks), true);
104 m_built = true; 103 m_built = true;
105 return m_paintArtifact; 104 return m_paintArtifact;
106 } 105 }
107 106
108 } // namespace blink 107 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698