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

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

Issue 2299223002: Compile under-invalidation checking in all builds (Closed)
Patch Set: Resolve conflict Created 4 years, 3 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"
(...skipping 28 matching lines...) Expand all
39 void ForeignLayerDisplayItem::appendToWebDisplayItemList(const IntRect&, WebDisp layItemList*) const 39 void ForeignLayerDisplayItem::appendToWebDisplayItemList(const IntRect&, WebDisp layItemList*) const
40 { 40 {
41 ASSERT_NOT_REACHED(); 41 ASSERT_NOT_REACHED();
42 } 42 }
43 43
44 bool ForeignLayerDisplayItem::drawsContent() const 44 bool ForeignLayerDisplayItem::drawsContent() const
45 { 45 {
46 return true; 46 return true;
47 } 47 }
48 48
49 #if ENABLE(ASSERT)
50 bool ForeignLayerDisplayItem::equals(const DisplayItem& other) const 49 bool ForeignLayerDisplayItem::equals(const DisplayItem& other) const
51 { 50 {
52 return DisplayItem::equals(other) 51 return DisplayItem::equals(other)
53 && m_layer == static_cast<const ForeignLayerDisplayItem&>(other).m_layer ; 52 && m_layer == static_cast<const ForeignLayerDisplayItem&>(other).m_layer ;
54 } 53 }
55 #endif // ENABLE(ASSERT)
56 54
57 #ifndef NDEBUG 55 #ifndef NDEBUG
58 void ForeignLayerDisplayItem::dumpPropertiesAsDebugString(StringBuilder& stringB uilder) const 56 void ForeignLayerDisplayItem::dumpPropertiesAsDebugString(StringBuilder& stringB uilder) const
59 { 57 {
60 DisplayItem::dumpPropertiesAsDebugString(stringBuilder); 58 DisplayItem::dumpPropertiesAsDebugString(stringBuilder);
61 stringBuilder.append(String::format(", layer: %d", m_layer->id())); 59 stringBuilder.append(String::format(", layer: %d", m_layer->id()));
62 } 60 }
63 #endif // NDEBUG 61 #endif // NDEBUG
64 62
65 void recordForeignLayer(GraphicsContext& context, 63 void recordForeignLayer(GraphicsContext& context,
66 const DisplayItemClient& client, DisplayItem::Type type, 64 const DisplayItemClient& client, DisplayItem::Type type,
67 WebLayer* webLayer, const FloatPoint& location, const IntSize& bounds) 65 WebLayer* webLayer, const FloatPoint& location, const IntSize& bounds)
68 { 66 {
69 PaintController& paintController = context.getPaintController(); 67 PaintController& paintController = context.getPaintController();
70 if (paintController.displayItemConstructionIsDisabled()) 68 if (paintController.displayItemConstructionIsDisabled())
71 return; 69 return;
72 70
73 paintController.createAndAppend<ForeignLayerDisplayItem>(client, type, webLa yer->ccLayer(), location, bounds); 71 paintController.createAndAppend<ForeignLayerDisplayItem>(client, type, webLa yer->ccLayer(), location, bounds);
74 } 72 }
75 73
76 } // namespace blink 74 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698