diff options
Diffstat (limited to 'chromium/cc/layers/picture_layer.cc')
-rw-r--r-- | chromium/cc/layers/picture_layer.cc | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/chromium/cc/layers/picture_layer.cc b/chromium/cc/layers/picture_layer.cc index fb313fa9605..d6c2c095d20 100644 --- a/chromium/cc/layers/picture_layer.cc +++ b/chromium/cc/layers/picture_layer.cc @@ -30,9 +30,7 @@ scoped_refptr<PictureLayer> PictureLayer::Create(ContentLayerClient* client) { } PictureLayer::PictureLayer(ContentLayerClient* client) - : instrumentation_object_tracker_(id()), - update_source_frame_number_(-1), - mask_type_(LayerMaskType::NOT_MASK) { + : instrumentation_object_tracker_(id()), update_source_frame_number_(-1) { picture_layer_inputs_.client = client; } @@ -46,18 +44,18 @@ PictureLayer::~PictureLayer() = default; std::unique_ptr<LayerImpl> PictureLayer::CreateLayerImpl( LayerTreeImpl* tree_impl) { - return PictureLayerImpl::Create(tree_impl, id(), mask_type_); + return PictureLayerImpl::Create(tree_impl, id()); } void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) { // TODO(enne): http://crbug.com/918126 debugging CHECK(this); + PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); + Layer::PushPropertiesTo(base_layer); TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cc.debug"), "PictureLayer::PushPropertiesTo"); - PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); - layer_impl->SetLayerMaskType(mask_type()); DropRecordingSourceContentIfInvalid(); layer_impl->SetNearestNeighbor(picture_layer_inputs_.nearest_neighbor); @@ -65,6 +63,7 @@ void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) { ShouldUseTransformedRasterization()); layer_impl->set_gpu_raster_max_texture_size( layer_tree_host()->device_viewport_rect().size()); + layer_impl->SetIsBackdropFilterMask(is_backdrop_filter_mask()); // TODO(enne): http://crbug.com/918126 debugging CHECK(this); @@ -150,7 +149,7 @@ bool PictureLayer::Update() { layer_tree_host()->recording_scale_factor()); SetNeedsPushProperties(); - paint_count_++; + IncreasePaintCount(); } else { // If this invalidation did not affect the recording source, then it can be // cleared as an optimization. @@ -160,10 +159,6 @@ bool PictureLayer::Update() { return updated; } -void PictureLayer::SetLayerMaskType(LayerMaskType mask_type) { - mask_type_ = mask_type; -} - sk_sp<SkPicture> PictureLayer::GetPicture() const { // We could either flatten the RecordingSource into a single SkPicture, or // paint a fresh one depending on what we intend to do with it. For now we @@ -235,6 +230,14 @@ bool PictureLayer::HasDrawableContent() const { return picture_layer_inputs_.client && Layer::HasDrawableContent(); } +void PictureLayer::SetIsBackdropFilterMask(bool is_backdrop_filter_mask) { + if (picture_layer_inputs_.is_backdrop_filter_mask == is_backdrop_filter_mask) + return; + + picture_layer_inputs_.is_backdrop_filter_mask = is_backdrop_filter_mask; + SetNeedsCommit(); +} + void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { benchmark->RunOnLayer(this); } |