Commit 9f75d381 authored by Vladimir Levin's avatar Vladimir Levin Committed by Commit Bot

[PE] Make PaintChunkProperties ctor explicit to avoid errors.

This patch makes PaintChunkProperties ctor explicit so that
PropertyTreeState cannot be accidentally converted to it, instead
requiring explicit construction.

R=chrishtr@chromium.org

Bug: 810958
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Id3637eb7aea213af42f1802fcba907e1806bc3c1
Reviewed-on: https://chromium-review.googlesource.com/912463Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535917}
parent 8583b438
......@@ -395,8 +395,8 @@ bool GraphicsLayer::PaintWithoutCommit(
GraphicsContext context(GetPaintController(), disabled_mode, nullptr);
if (RuntimeEnabledFeatures::SlimmingPaintV175Enabled()) {
DCHECK(layer_state_) << "No layer state for GraphicsLayer: " << DebugName();
GetPaintController().UpdateCurrentPaintChunkProperties(WTF::nullopt,
layer_state_->state);
GetPaintController().UpdateCurrentPaintChunkProperties(
WTF::nullopt, PaintChunkProperties(layer_state_->state));
}
previous_interest_rect_ = *interest_rect;
......
......@@ -147,7 +147,8 @@ struct TestChunks {
size_t i = items.size();
items.AllocateAndConstruct<DrawingDisplayItem>(
DefaultId().client, DefaultId().type, std::move(record));
chunks.emplace_back(i, i + 1, DefaultId(), PropertyTreeState(t, c, e));
chunks.emplace_back(i, i + 1, DefaultId(),
PaintChunkProperties(PropertyTreeState(t, c, e)));
}
Vector<const PaintChunk*> GetChunkList() const {
......
......@@ -26,7 +26,7 @@ namespace blink {
struct PLATFORM_EXPORT PaintChunkProperties {
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
PaintChunkProperties(const PropertyTreeState& state)
explicit PaintChunkProperties(const PropertyTreeState& state)
: property_tree_state(state), backface_hidden(false) {}
PaintChunkProperties()
......
......@@ -29,7 +29,7 @@ PaintRecordBuilder::PaintRecordBuilder(SkMetaData* meta_data,
if (RuntimeEnabledFeatures::SlimmingPaintV175Enabled()) {
paint_controller_->UpdateCurrentPaintChunkProperties(
WTF::nullopt, PropertyTreeState::Root());
WTF::nullopt, PaintChunkProperties(PropertyTreeState::Root()));
}
const HighContrastSettings* high_contrast_settings =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment