summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/graphics/paint/foreign_layer_display_item.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/third_party/blink/renderer/platform/graphics/paint/foreign_layer_display_item.cc
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-c30a6232df03e1efbd9f3b226777b07e087a1122.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/graphics/paint/foreign_layer_display_item.cc')
-rw-r--r--chromium/third_party/blink/renderer/platform/graphics/paint/foreign_layer_display_item.cc35
1 files changed, 9 insertions, 26 deletions
diff --git a/chromium/third_party/blink/renderer/platform/graphics/paint/foreign_layer_display_item.cc b/chromium/third_party/blink/renderer/platform/graphics/paint/foreign_layer_display_item.cc
index 690644d7dd0..8b76eb1fdd9 100644
--- a/chromium/third_party/blink/renderer/platform/graphics/paint/foreign_layer_display_item.cc
+++ b/chromium/third_party/blink/renderer/platform/graphics/paint/foreign_layer_display_item.cc
@@ -54,14 +54,12 @@ ForeignLayerDisplayItem::ForeignLayerDisplayItem(
const DisplayItemClient& client,
Type type,
scoped_refptr<cc::Layer> layer,
- const FloatPoint& offset,
- const LayerAsJSONClient* json_client)
+ const FloatPoint& offset)
: DisplayItem(
*new ForeignLayerDisplayItemClient(client, std::move(layer), offset),
type,
sizeof(*this)),
- offset_(offset),
- json_client_(json_client) {
+ offset_(offset) {
DCHECK(IsForeignLayerType(type));
DCHECK(!IsCacheable());
}
@@ -74,10 +72,6 @@ cc::Layer* ForeignLayerDisplayItem::GetLayer() const {
return static_cast<const ForeignLayerDisplayItemClient&>(Client()).GetLayer();
}
-const LayerAsJSONClient* ForeignLayerDisplayItem::GetLayerAsJSONClient() const {
- return json_client_;
-}
-
bool ForeignLayerDisplayItem::Equals(const DisplayItem& other) const {
return GetType() == other.GetType() &&
GetLayer() ==
@@ -93,13 +87,12 @@ void ForeignLayerDisplayItem::PropertiesAsJSON(JSONObject& json) const {
}
#endif
-static void RecordForeignLayerInternal(GraphicsContext& context,
- const DisplayItemClient& client,
- DisplayItem::Type type,
- scoped_refptr<cc::Layer> layer,
- const FloatPoint& offset,
- const LayerAsJSONClient* json_client,
- const PropertyTreeState* properties) {
+void RecordForeignLayer(GraphicsContext& context,
+ const DisplayItemClient& client,
+ DisplayItem::Type type,
+ scoped_refptr<cc::Layer> layer,
+ const FloatPoint& offset,
+ const PropertyTreeState* properties) {
PaintController& paint_controller = context.GetPaintController();
// This is like ScopedPaintChunkProperties but uses null id because foreign
// layer chunk doesn't need an id nor a client.
@@ -109,21 +102,11 @@ static void RecordForeignLayerInternal(GraphicsContext& context,
paint_controller.UpdateCurrentPaintChunkProperties(nullptr, *properties);
}
paint_controller.CreateAndAppend<ForeignLayerDisplayItem>(
- client, type, std::move(layer), offset, json_client);
+ client, type, std::move(layer), offset);
if (properties) {
paint_controller.UpdateCurrentPaintChunkProperties(nullptr,
*previous_properties);
}
}
-void RecordForeignLayer(GraphicsContext& context,
- const DisplayItemClient& client,
- DisplayItem::Type type,
- scoped_refptr<cc::Layer> layer,
- const FloatPoint& offset,
- const PropertyTreeState* properties) {
- RecordForeignLayerInternal(context, client, type, std::move(layer), offset,
- nullptr, properties);
-}
-
} // namespace blink