Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/ForeignLayerDisplayItem.cpp

Issue 2119033003: Fix alignment issue of ContiguousContainer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/paint/ForeignLayerDisplayItem.h" 5 #include "platform/graphics/paint/ForeignLayerDisplayItem.h"
6 6
7 #include "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "platform/graphics/GraphicsContext.h" 8 #include "platform/graphics/GraphicsContext.h"
9 #include "platform/graphics/paint/PaintController.h" 9 #include "platform/graphics/paint/PaintController.h"
10 #include "public/platform/WebLayer.h" 10 #include "public/platform/WebLayer.h"
11 #include "wtf/Assertions.h" 11 #include "wtf/Assertions.h"
12 #include <utility> 12 #include <utility>
13 13
14 namespace blink { 14 namespace blink {
15 15
16 ForeignLayerDisplayItem::ForeignLayerDisplayItem( 16 ForeignLayerDisplayItem::ForeignLayerDisplayItem(
17 const DisplayItemClient& client, Type type, 17 const DisplayItemClient& client, Type type,
18 scoped_refptr<cc::Layer> layer, 18 scoped_refptr<cc::Layer> layer,
19 const FloatPoint& location, const IntSize& bounds) 19 const FloatPoint& location, const IntSize& bounds)
20 : DisplayItem(client, type, sizeof(*this)) 20 : DisplayItemBase(client, type)
21 , m_layer(std::move(layer)) 21 , m_layer(std::move(layer))
22 , m_location(location) 22 , m_location(location)
23 , m_bounds(bounds) 23 , m_bounds(bounds)
24 { 24 {
25 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 25 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
26 ASSERT(isForeignLayerType(type)); 26 ASSERT(isForeignLayerType(type));
27 ASSERT(m_layer); 27 ASSERT(m_layer);
28 } 28 }
29 29
30 ForeignLayerDisplayItem::~ForeignLayerDisplayItem() 30 ForeignLayerDisplayItem::~ForeignLayerDisplayItem()
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 WebLayer* webLayer, const FloatPoint& location, const IntSize& bounds) 67 WebLayer* webLayer, const FloatPoint& location, const IntSize& bounds)
68 { 68 {
69 PaintController& paintController = context.getPaintController(); 69 PaintController& paintController = context.getPaintController();
70 if (paintController.displayItemConstructionIsDisabled()) 70 if (paintController.displayItemConstructionIsDisabled())
71 return; 71 return;
72 72
73 paintController.createAndAppend<ForeignLayerDisplayItem>(client, type, webLa yer->ccLayer(), location, bounds); 73 paintController.createAndAppend<ForeignLayerDisplayItem>(client, type, webLa yer->ccLayer(), location, bounds);
74 } 74 }
75 75
76 } // namespace blink 76 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698