Skip to content

Commit

Permalink
Revert of Remove cullRect() from PaintOpBuffer. (patchset chromium#6
Browse files Browse the repository at this point in the history
…id:100001 of https://codereview.chromium.org/2889653002/ )

Reason for revert:
Seems to have introduced a use-of-uninitialized-value, making lots of tests
fail on MSan bots:
https://uberchromegw.corp.google.com/i/chromium.memory/builders/Linux%20MSan%20Tests
https://uberchromegw.corp.google.com/i/chromium.memory/builders/Linux%20ChromiumOS%20MSan%20Tests

Original issue's description:
> Remove cullRect() from PaintOpBuffer.
>
> Pass it directly to RecordPaintCanvas and ToSkPicture, and other skia
> methods which is where it is used.
>
> This allows us to more easily get rid of cc::DisplayItem and its
> subclasses, replacing them with a PaintOpBuffer in DisplayItemList
> directly instead. The difficulty I faced with that was that if
> DisplayItemList has a single PaintOpBuffer, then it has a single
> cull rect. However when painting, each "batch" of PaintOps can
> have a different cull rect (corresponding to the PaintOps that
> would have been in a single DisplayItem before). So, instead the
> cull rect should be a property of recording at the
> RecordPaintCanvas level, which is a temporary object. As such,
> creators of cc::RecordPaintCanvas (mostly thru cc::PaintRecorder)
> need to manage the cull rect themselves to pass to things that
> want to use it with the cc::PaintOpBuffer (aka cc::PaintRecord at
> this time).
>
> Original code review was done on gerrit:
> https://chromium-review.googlesource.com/c/503472
>
> R=chrishtr@chromium.org, enne@chromium.org, pdr@chromium.org
> BUG=671433, 646010
> CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
>
> Review-Url: https://codereview.chromium.org/2889653002 .
> Cr-Commit-Position: refs/heads/master@{#472917}
> Committed: https://chromium.googlesource.com/chromium/src/+/c5f1b6126a7657234b9abc0c4359cbab45850b69

TBR=chrishtr@chromium.org,enne@chromium.org,pdr@chromium.org,danakj@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=671433, 646010
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2894843002
Cr-Commit-Position: refs/heads/master@{#473164}
  • Loading branch information
treib authored and Commit bot committed May 19, 2017
1 parent 8e46baf commit ba67e74
Show file tree
Hide file tree
Showing 67 changed files with 295 additions and 399 deletions.
6 changes: 2 additions & 4 deletions cc/blink/web_display_item_list_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "third_party/skia/include/core/SkMatrix44.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/safe_integer_conversions.h"
#include "ui/gfx/skia_util.h"
#include "ui/gfx/transform.h"

namespace cc_blink {
Expand All @@ -42,10 +41,9 @@ WebDisplayItemListImpl::WebDisplayItemListImpl(

void WebDisplayItemListImpl::AppendDrawingItem(
const blink::WebRect& visual_rect,
sk_sp<const cc::PaintRecord> record,
const blink::WebRect& record_bounds) {
sk_sp<const cc::PaintRecord> record) {
display_item_list_->CreateAndAppendDrawingItem<cc::DrawingDisplayItem>(
visual_rect, std::move(record), gfx::RectToSkRect(record_bounds));
visual_rect, std::move(record));
}

void WebDisplayItemListImpl::AppendClipItem(
Expand Down
3 changes: 1 addition & 2 deletions cc/blink/web_display_item_list_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class WebDisplayItemListImpl : public blink::WebDisplayItemList {

// blink::WebDisplayItemList implementation.
void AppendDrawingItem(const blink::WebRect& visual_rect,
sk_sp<const cc::PaintRecord> record,
const blink::WebRect& record_bounds) override;
sk_sp<const cc::PaintRecord> record) override;
void AppendClipItem(
const blink::WebRect& clip_rect,
const blink::WebVector<SkRRect>& rounded_clip_rects) override;
Expand Down
3 changes: 1 addition & 2 deletions cc/layers/picture_image_layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ scoped_refptr<DisplayItemList> PictureImageLayer::PaintContentsToDisplayList(
canvas->drawImage(image_, 0, 0);

display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
PaintableRegion(), recorder.finishRecordingAsPicture(),
gfx::RectToSkRect(PaintableRegion()));
PaintableRegion(), recorder.finishRecordingAsPicture());

display_list->Finalize();
return display_list;
Expand Down
4 changes: 2 additions & 2 deletions cc/paint/discardable_image_map_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ TEST_F(DiscardableImageMapTest, ClipsImageRects) {
display_list->CreateAndAppendPairedBeginItem<ClipDisplayItem>(
gfx::Rect(250, 250), std::vector<SkRRect>(), false);
display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
gfx::Rect(500, 500), record, SkRect::MakeWH(500, 500));
gfx::Rect(500, 500), record);
display_list->CreateAndAppendPairedEndItem<EndClipDisplayItem>();
display_list->Finalize();
display_list->GenerateDiscardableImagesMetadata();
Expand All @@ -688,7 +688,7 @@ TEST_F(DiscardableImageMapTest, GathersDiscardableImagesFromNestedOps) {
list_record->push<DrawImageOp>(discardable_image2, 100.f, 100.f, nullptr);
scoped_refptr<DisplayItemList> display_list = new DisplayItemList;
display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
gfx::Rect(100, 100, 100, 100), list_record, SkRect::MakeWH(100, 100));
gfx::Rect(100, 100, 100, 100), list_record);
display_list->Finalize();

PaintOpBuffer buffer;
Expand Down
14 changes: 7 additions & 7 deletions cc/paint/display_item_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ NOINLINE DISABLE_CFI_PERF void RasterItem(const DisplayItem& base_item,
break;
case DisplayItem::DRAWING: {
const auto& item = static_cast<const DrawingDisplayItem&>(base_item);
if (canvas->quickReject(item.bounds))
if (canvas->quickReject(item.picture->cullRect()))
break;

// TODO(enne): Maybe the PaintRecord itself could know whether this
Expand Down Expand Up @@ -427,15 +427,15 @@ DisplayItemList::CreateTracedValue(bool include_items) const {
state->EndArray();

state->BeginArray("cullRect");
state->AppendInteger(item.bounds.x());
state->AppendInteger(item.bounds.y());
state->AppendInteger(item.bounds.width());
state->AppendInteger(item.bounds.height());
state->AppendInteger(item.picture->cullRect().x());
state->AppendInteger(item.picture->cullRect().y());
state->AppendInteger(item.picture->cullRect().width());
state->AppendInteger(item.picture->cullRect().height());
state->EndArray();

std::string b64_picture;
PictureDebugUtil::SerializeAsBase64(
ToSkPicture(item.picture, item.bounds).get(), &b64_picture);
PictureDebugUtil::SerializeAsBase64(ToSkPicture(item.picture).get(),
&b64_picture);
state->SetString("skp64", b64_picture);
state->EndDictionary();
break;
Expand Down
89 changes: 32 additions & 57 deletions cc/paint/display_item_list_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,12 @@ void AppendFirstSerializationTestPicture(scoped_refptr<DisplayItemList> list,
PaintFlags red_paint;
red_paint.setColor(SK_ColorRED);

SkRect bounds = SkRect::MakeXYWH(offset.x(), offset.y(), layer_size.width(),
layer_size.height());
PaintCanvas* canvas = recorder.beginRecording(bounds);
PaintCanvas* canvas = recorder.beginRecording(SkRect::MakeXYWH(
offset.x(), offset.y(), layer_size.width(), layer_size.height()));
canvas->translate(offset.x(), offset.y());
canvas->drawRect(SkRect::MakeWH(4, 4), red_paint);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
kVisualRect, recorder.finishRecordingAsPicture(), bounds);
kVisualRect, recorder.finishRecordingAsPicture());
}

} // namespace
Expand All @@ -131,8 +130,7 @@ TEST(DisplayItemListTest, SingleDrawingItem) {
canvas->drawRect(SkRect::MakeLTRB(0.f, 0.f, 60.f, 60.f), red_paint);
canvas->drawRect(SkRect::MakeLTRB(50.f, 50.f, 75.f, 75.f), blue_flags);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
kVisualRect, recorder.finishRecordingAsPicture(),
gfx::RectFToSkRect(recording_rect));
kVisualRect, recorder.finishRecordingAsPicture());
list->Finalize();
DrawDisplayList(pixels, layer_rect, list);

Expand Down Expand Up @@ -172,8 +170,7 @@ TEST(DisplayItemListTest, ClipItem) {
canvas->translate(first_offset.x(), first_offset.y());
canvas->drawRect(SkRect::MakeWH(60, 60), red_paint);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
kVisualRect, recorder.finishRecordingAsPicture(),
gfx::RectFToSkRect(first_recording_rect));
kVisualRect, recorder.finishRecordingAsPicture());

gfx::Rect clip_rect(60, 60, 10, 10);
list->CreateAndAppendPairedBeginItem<ClipDisplayItem>(
Expand All @@ -186,8 +183,7 @@ TEST(DisplayItemListTest, ClipItem) {
canvas->translate(second_offset.x(), second_offset.y());
canvas->drawRect(SkRect::MakeLTRB(50.f, 50.f, 75.f, 75.f), blue_flags);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
kVisualRect, recorder.finishRecordingAsPicture(),
gfx::RectFToSkRect(second_recording_rect));
kVisualRect, recorder.finishRecordingAsPicture());

list->CreateAndAppendPairedEndItem<EndClipDisplayItem>();
list->Finalize();
Expand Down Expand Up @@ -231,8 +227,7 @@ TEST(DisplayItemListTest, TransformItem) {
canvas->translate(first_offset.x(), first_offset.y());
canvas->drawRect(SkRect::MakeWH(60, 60), red_paint);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
kVisualRect, recorder.finishRecordingAsPicture(),
gfx::RectFToSkRect(first_recording_rect));
kVisualRect, recorder.finishRecordingAsPicture());

gfx::Transform transform;
transform.Rotate(45.0);
Expand All @@ -245,8 +240,7 @@ TEST(DisplayItemListTest, TransformItem) {
canvas->translate(second_offset.x(), second_offset.y());
canvas->drawRect(SkRect::MakeLTRB(50.f, 50.f, 75.f, 75.f), blue_flags);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
kVisualRect, recorder.finishRecordingAsPicture(),
gfx::RectFToSkRect(second_recording_rect));
kVisualRect, recorder.finishRecordingAsPicture());

list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>();
list->Finalize();
Expand Down Expand Up @@ -309,16 +303,14 @@ TEST(DisplayItemListTest, FilterItem) {
PaintFlags red_paint;
red_paint.setColor(SK_ColorRED);

SkRect bounds =
SkRect::MakeXYWH(0, 0, layer_rect.width(), layer_rect.height());
PaintCanvas* canvas = recorder.beginRecording(bounds);
PaintCanvas* canvas = recorder.beginRecording(
SkRect::MakeXYWH(0, 0, layer_rect.width(), layer_rect.height()));
canvas->drawRect(
SkRect::MakeLTRB(filter_bounds.x(), filter_bounds.y(),
filter_bounds.right(), filter_bounds.bottom()),
red_paint);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
ToNearestRect(filter_bounds), recorder.finishRecordingAsPicture(),
bounds);
ToNearestRect(filter_bounds), recorder.finishRecordingAsPicture());
}

list->CreateAndAppendPairedEndItem<EndFilterDisplayItem>();
Expand Down Expand Up @@ -356,8 +348,7 @@ TEST(DisplayItemListTest, ApproximateMemoryUsage) {
ASSERT_GE(record_size, kNumCommandsInTestSkPicture * sizeof(SkRect));

auto list = make_scoped_refptr(new DisplayItemList);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
kVisualRect, record, gfx::RectToSkRect(layer_rect));
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(kVisualRect, record);
list->Finalize();
memory_usage = list->ApproximateMemoryUsage();
EXPECT_GE(memory_usage, record_size);
Expand Down Expand Up @@ -417,8 +408,7 @@ TEST(DisplayItemListTest, SizeOne) {
auto list = make_scoped_refptr(new DisplayItemList);
gfx::Rect drawing_bounds(5, 6, 1, 1);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_bounds, CreateRectPicture(drawing_bounds),
gfx::RectToSkRect(drawing_bounds));
drawing_bounds, CreateRectPicture(drawing_bounds));
EXPECT_EQ(1u, list->size());
}

Expand All @@ -438,8 +428,7 @@ TEST(DisplayItemListTest, AppendVisualRectSimple) {

gfx::Rect drawing_bounds(5, 6, 7, 8);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_bounds, CreateRectPicture(drawing_bounds),
gfx::RectToSkRect(drawing_bounds));
drawing_bounds, CreateRectPicture(drawing_bounds));

EXPECT_EQ(1u, list->size());
EXPECT_RECT_EQ(drawing_bounds, list->VisualRectForTesting(0));
Expand Down Expand Up @@ -491,8 +480,7 @@ TEST(DisplayItemListTest, AppendVisualRectBlockContainingDrawing) {

gfx::Rect drawing_bounds(5, 6, 1, 1);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_bounds, CreateRectPicture(drawing_bounds),
gfx::RectToSkRect(drawing_bounds));
drawing_bounds, CreateRectPicture(drawing_bounds));

list->CreateAndAppendPairedEndItem<EndClipDisplayItem>();

Expand All @@ -513,8 +501,7 @@ TEST(DisplayItemListTest, AppendVisualRectBlockContainingEscapedDrawing) {

gfx::Rect drawing_bounds(1, 2, 3, 4);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_bounds, CreateRectPicture(drawing_bounds),
gfx::RectToSkRect(drawing_bounds));
drawing_bounds, CreateRectPicture(drawing_bounds));

list->CreateAndAppendPairedEndItem<EndClipDisplayItem>();

Expand All @@ -533,17 +520,15 @@ TEST(DisplayItemListTest,

gfx::Rect drawing_a_bounds(1, 2, 3, 4);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_a_bounds, CreateRectPicture(drawing_a_bounds),
gfx::RectToSkRect(drawing_a_bounds));
drawing_a_bounds, CreateRectPicture(drawing_a_bounds));

gfx::Rect clip_bounds(5, 6, 7, 8);
list->CreateAndAppendPairedBeginItem<ClipDisplayItem>(
clip_bounds, std::vector<SkRRect>(), true);

gfx::Rect drawing_b_bounds(13, 14, 1, 1);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_b_bounds, CreateRectPicture(drawing_b_bounds),
gfx::RectToSkRect(drawing_b_bounds));
drawing_b_bounds, CreateRectPicture(drawing_b_bounds));

list->CreateAndAppendPairedEndItem<EndClipDisplayItem>();

Expand All @@ -565,15 +550,13 @@ TEST(DisplayItemListTest, AppendVisualRectTwoBlocksTwoDrawings) {

gfx::Rect drawing_a_bounds(5, 6, 1, 1);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_a_bounds, CreateRectPicture(drawing_a_bounds),
gfx::RectToSkRect(drawing_a_bounds));
drawing_a_bounds, CreateRectPicture(drawing_a_bounds));

list->CreateAndAppendPairedBeginItem<TransformDisplayItem>(gfx::Transform());

gfx::Rect drawing_b_bounds(7, 8, 1, 1);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_b_bounds, CreateRectPicture(drawing_b_bounds),
gfx::RectToSkRect(drawing_b_bounds));
drawing_b_bounds, CreateRectPicture(drawing_b_bounds));

list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>();
list->CreateAndAppendPairedEndItem<EndClipDisplayItem>();
Expand Down Expand Up @@ -602,15 +585,13 @@ TEST(DisplayItemListTest,

gfx::Rect drawing_a_bounds(5, 6, 1, 1);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_a_bounds, CreateRectPicture(drawing_a_bounds),
gfx::RectToSkRect(drawing_a_bounds));
drawing_a_bounds, CreateRectPicture(drawing_a_bounds));

list->CreateAndAppendPairedBeginItem<TransformDisplayItem>(gfx::Transform());

gfx::Rect drawing_b_bounds(1, 2, 3, 4);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_b_bounds, CreateRectPicture(drawing_b_bounds),
gfx::RectToSkRect(drawing_b_bounds));
drawing_b_bounds, CreateRectPicture(drawing_b_bounds));

list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>();
list->CreateAndAppendPairedEndItem<EndClipDisplayItem>();
Expand Down Expand Up @@ -639,15 +620,13 @@ TEST(DisplayItemListTest,

gfx::Rect drawing_a_bounds(1, 2, 3, 4);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_a_bounds, CreateRectPicture(drawing_a_bounds),
gfx::RectToSkRect(drawing_a_bounds));
drawing_a_bounds, CreateRectPicture(drawing_a_bounds));

list->CreateAndAppendPairedBeginItem<TransformDisplayItem>(gfx::Transform());

gfx::Rect drawing_b_bounds(7, 8, 1, 1);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_b_bounds, CreateRectPicture(drawing_b_bounds),
gfx::RectToSkRect(drawing_b_bounds));
drawing_b_bounds, CreateRectPicture(drawing_b_bounds));

list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>();
list->CreateAndAppendPairedEndItem<EndClipDisplayItem>();
Expand Down Expand Up @@ -676,15 +655,13 @@ TEST(DisplayItemListTest,

gfx::Rect drawing_a_bounds(13, 14, 1, 1);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_a_bounds, CreateRectPicture(drawing_a_bounds),
gfx::RectToSkRect(drawing_a_bounds));
drawing_a_bounds, CreateRectPicture(drawing_a_bounds));

list->CreateAndAppendPairedBeginItem<TransformDisplayItem>(gfx::Transform());

gfx::Rect drawing_b_bounds(1, 2, 3, 4);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
drawing_b_bounds, CreateRectPicture(drawing_b_bounds),
gfx::RectToSkRect(drawing_b_bounds));
drawing_b_bounds, CreateRectPicture(drawing_b_bounds));

list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>();
list->CreateAndAppendPairedEndItem<EndClipDisplayItem>();
Expand Down Expand Up @@ -750,8 +727,7 @@ TEST(DisplayItemListTest, SaveDrawRestore) {
list->CreateAndAppendPairedBeginItem<CompositingDisplayItem>(
80, SkBlendMode::kSrcOver, nullptr, nullptr, false);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
kVisualRect, CreateRectPictureWithAlpha(kVisualRect, 40),
gfx::RectToSkRect(kVisualRect));
kVisualRect, CreateRectPictureWithAlpha(kVisualRect, 40));
list->CreateAndAppendPairedEndItem<EndCompositingDisplayItem>();
list->Finalize();

Expand Down Expand Up @@ -801,8 +777,7 @@ TEST(DisplayItemListTest, SaveDrawRestoreFail_BadSaveFlags) {
list->CreateAndAppendPairedBeginItem<CompositingDisplayItem>(
80, SkBlendMode::kSrc, nullptr, nullptr, false);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
kVisualRect, CreateRectPictureWithAlpha(kVisualRect, 40),
gfx::RectToSkRect(kVisualRect));
kVisualRect, CreateRectPictureWithAlpha(kVisualRect, 40));
list->CreateAndAppendPairedEndItem<EndCompositingDisplayItem>();
list->Finalize();

Expand All @@ -818,10 +793,10 @@ TEST(DisplayItemListTest, SaveDrawRestoreFail_BadSaveFlags) {
// The same as SaveDrawRestore, but with too many ops in the PaintRecord.
TEST(DisplayItemListTest, SaveDrawRestoreFail_TooManyOps) {
sk_sp<const PaintRecord> record;
SkRect bounds = SkRect::MakeWH(kVisualRect.width(), kVisualRect.height());
{
PaintRecorder recorder;
PaintCanvas* canvas = recorder.beginRecording(bounds);
PaintCanvas* canvas =
recorder.beginRecording(kVisualRect.width(), kVisualRect.height());
PaintFlags flags;
flags.setAlpha(40);
canvas->drawRect(gfx::RectToSkRect(kVisualRect), flags);
Expand All @@ -835,8 +810,8 @@ TEST(DisplayItemListTest, SaveDrawRestoreFail_TooManyOps) {

list->CreateAndAppendPairedBeginItem<CompositingDisplayItem>(
80, SkBlendMode::kSrcOver, nullptr, nullptr, false);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
kVisualRect, std::move(record), bounds);
list->CreateAndAppendDrawingItem<DrawingDisplayItem>(kVisualRect,
std::move(record));
list->CreateAndAppendPairedEndItem<EndCompositingDisplayItem>();
list->Finalize();

Expand Down
5 changes: 2 additions & 3 deletions cc/paint/drawing_display_item.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ namespace cc {

DrawingDisplayItem::DrawingDisplayItem() : DisplayItem(DRAWING) {}

DrawingDisplayItem::DrawingDisplayItem(sk_sp<const PaintRecord> record,
const SkRect& bounds)
: DisplayItem(DRAWING), picture(std::move(record)), bounds(bounds) {}
DrawingDisplayItem::DrawingDisplayItem(sk_sp<const PaintRecord> record)
: DisplayItem(DRAWING), picture(std::move(record)) {}

DrawingDisplayItem::DrawingDisplayItem(const DrawingDisplayItem& item)
: DisplayItem(DRAWING), picture(item.picture) {}
Expand Down
4 changes: 1 addition & 3 deletions cc/paint/drawing_display_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@ namespace cc {
class CC_PAINT_EXPORT DrawingDisplayItem : public DisplayItem {
public:
DrawingDisplayItem();
explicit DrawingDisplayItem(sk_sp<const PaintRecord> record,
const SkRect& bounds);
explicit DrawingDisplayItem(sk_sp<const PaintRecord> record);
explicit DrawingDisplayItem(const DrawingDisplayItem& item);
~DrawingDisplayItem() override;

size_t ExternalMemoryUsage() const;
size_t OpCount() const;

const sk_sp<const PaintRecord> picture;
SkRect bounds;
};

} // namespace cc
Expand Down
Loading

0 comments on commit ba67e74

Please sign in to comment.