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

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

Issue 2889653002: Remove cullRect() from PaintOpBuffer. (Closed)
Patch Set: movecullrect2 rebase-once-and-for-all Created 3 years, 7 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 <memory> 7 #include <memory>
8 #include "cc/layers/layer.h" 8 #include "cc/layers/layer.h"
9 #include "platform/graphics/paint/DisplayItemClient.h" 9 #include "platform/graphics/paint/DisplayItemClient.h"
10 #include "platform/graphics/paint/DrawingDisplayItem.h" 10 #include "platform/graphics/paint/DrawingDisplayItem.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 chunk.properties = properties; 66 chunk.properties = properties;
67 paint_chunks_.push_back(chunk); 67 paint_chunks_.push_back(chunk);
68 return *this; 68 return *this;
69 } 69 }
70 70
71 TestPaintArtifact& TestPaintArtifact::RectDrawing(const FloatRect& bounds, 71 TestPaintArtifact& TestPaintArtifact::RectDrawing(const FloatRect& bounds,
72 Color color) { 72 Color color) {
73 std::unique_ptr<DummyRectClient> client = 73 std::unique_ptr<DummyRectClient> client =
74 WTF::MakeUnique<DummyRectClient>(bounds, color); 74 WTF::MakeUnique<DummyRectClient>(bounds, color);
75 display_item_list_.AllocateAndConstruct<DrawingDisplayItem>( 75 display_item_list_.AllocateAndConstruct<DrawingDisplayItem>(
76 *client, DisplayItem::kDrawingFirst, client->MakeRecord()); 76 *client, DisplayItem::kDrawingFirst, client->MakeRecord(), bounds);
77 dummy_clients_.push_back(std::move(client)); 77 dummy_clients_.push_back(std::move(client));
78 return *this; 78 return *this;
79 } 79 }
80 80
81 TestPaintArtifact& TestPaintArtifact::ForeignLayer( 81 TestPaintArtifact& TestPaintArtifact::ForeignLayer(
82 const FloatPoint& location, 82 const FloatPoint& location,
83 const IntSize& size, 83 const IntSize& size,
84 scoped_refptr<cc::Layer> layer) { 84 scoped_refptr<cc::Layer> layer) {
85 FloatRect float_bounds(location, FloatSize(size)); 85 FloatRect float_bounds(location, FloatSize(size));
86 std::unique_ptr<DummyRectClient> client = 86 std::unique_ptr<DummyRectClient> client =
(...skipping 11 matching lines...) Expand all
98 98
99 if (!paint_chunks_.IsEmpty()) 99 if (!paint_chunks_.IsEmpty())
100 paint_chunks_.back().end_index = display_item_list_.size(); 100 paint_chunks_.back().end_index = display_item_list_.size();
101 paint_artifact_ = PaintArtifact(std::move(display_item_list_), 101 paint_artifact_ = PaintArtifact(std::move(display_item_list_),
102 std::move(paint_chunks_), true); 102 std::move(paint_chunks_), true);
103 built_ = true; 103 built_ = true;
104 return paint_artifact_; 104 return paint_artifact_;
105 } 105 }
106 106
107 } // namespace blink 107 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698