diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/graphics/graphics_layer.h')
-rw-r--r-- | chromium/third_party/blink/renderer/platform/graphics/graphics_layer.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/chromium/third_party/blink/renderer/platform/graphics/graphics_layer.h b/chromium/third_party/blink/renderer/platform/graphics/graphics_layer.h index ced1a78d816..1c7f75af559 100644 --- a/chromium/third_party/blink/renderer/platform/graphics/graphics_layer.h +++ b/chromium/third_party/blink/renderer/platform/graphics/graphics_layer.h @@ -232,6 +232,8 @@ class PLATFORM_EXPORT GraphicsLayer : public cc::LayerClient, return const_cast<GraphicsLayer*>(this)->ContentsLayerIfRegistered(); } + const IntRect& ContentsRect() const { return contents_rect_; } + // For hosting this GraphicsLayer in a native layer hierarchy. cc::PictureLayer* CcLayer() const; @@ -294,16 +296,15 @@ class PLATFORM_EXPORT GraphicsLayer : public cc::LayerClient, } IntPoint GetOffsetFromTransformNode() const { return layer_state_->offset; } - void SetContentsPropertyTreeState(const PropertyTreeState&); + void SetContentsLayerState(const PropertyTreeState&, + const IntPoint& layer_offset); const PropertyTreeState& GetContentsPropertyTreeState() const { - return contents_property_tree_state_ ? *contents_property_tree_state_ - : GetPropertyTreeState(); + return contents_layer_state_ ? contents_layer_state_->state + : GetPropertyTreeState(); } IntPoint GetContentsOffsetFromTransformNode() const { - auto offset = contents_rect_.Location(); - if (layer_state_) - offset = offset + GetOffsetFromTransformNode(); - return offset; + return contents_layer_state_ ? contents_layer_state_->offset + : GetOffsetFromTransformNode(); } // Capture the last painted result into a PaintRecord. This GraphicsLayer @@ -423,7 +424,7 @@ class PLATFORM_EXPORT GraphicsLayer : public cc::LayerClient, IntPoint offset; }; std::unique_ptr<LayerState> layer_state_; - std::unique_ptr<PropertyTreeState> contents_property_tree_state_; + std::unique_ptr<LayerState> contents_layer_state_; std::unique_ptr<RasterInvalidator> raster_invalidator_; |