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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h

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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef DrawingDisplayItem_h 5 #ifndef DrawingDisplayItem_h
6 #define DrawingDisplayItem_h 6 #define DrawingDisplayItem_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/RuntimeEnabledFeatures.h" 9 #include "platform/RuntimeEnabledFeatures.h"
10 #include "platform/geometry/FloatPoint.h" 10 #include "platform/geometry/FloatPoint.h"
11 #include "platform/graphics/paint/DisplayItem.h" 11 #include "platform/graphics/paint/DisplayItem.h"
12 #include "third_party/skia/include/core/SkPicture.h" 12 #include "third_party/skia/include/core/SkPicture.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class PLATFORM_EXPORT DrawingDisplayItem final : public DisplayItem { 16 class PLATFORM_EXPORT DrawingDisplayItem final : public DisplayItemBase<DrawingD isplayItem> {
17 public: 17 public:
18 #if ENABLE(ASSERT) 18 #if ENABLE(ASSERT)
19 enum UnderInvalidationCheckingMode { 19 enum UnderInvalidationCheckingMode {
20 CheckPicture, // Check if the new picture and the old picture are the sa me 20 CheckPicture, // Check if the new picture and the old picture are the sa me
21 CheckBitmap, // Check if the new picture and the old picture produce the same bitmap 21 CheckBitmap, // Check if the new picture and the old picture produce the same bitmap
22 }; 22 };
23 #endif 23 #endif
24 24
25 DrawingDisplayItem(const DisplayItemClient& client 25 DrawingDisplayItem(const DisplayItemClient& client
26 , Type type 26 , Type type
27 , PassRefPtr<const SkPicture> picture 27 , PassRefPtr<const SkPicture> picture
28 , bool knownToBeOpaque = false 28 , bool knownToBeOpaque = false
29 #if ENABLE(ASSERT) 29 #if ENABLE(ASSERT)
30 , UnderInvalidationCheckingMode underInvalidationCheckingMode = CheckPic ture 30 , UnderInvalidationCheckingMode underInvalidationCheckingMode = CheckPic ture
31 #endif 31 #endif
32 ) 32 )
33 : DisplayItem(client, type, sizeof(*this)) 33 : DisplayItemBase(client, type)
34 , m_picture(picture && picture->approximateOpCount() ? picture : nullptr ) 34 , m_picture(picture && picture->approximateOpCount() ? picture : nullptr )
35 , m_knownToBeOpaque(knownToBeOpaque) 35 , m_knownToBeOpaque(knownToBeOpaque)
36 #if ENABLE(ASSERT) 36 #if ENABLE(ASSERT)
37 , m_underInvalidationCheckingMode(underInvalidationCheckingMode) 37 , m_underInvalidationCheckingMode(underInvalidationCheckingMode)
38 #endif 38 #endif
39 { 39 {
40 ASSERT(isDrawingType(type)); 40 ASSERT(isDrawingType(type));
41 } 41 }
42 42
43 void replay(GraphicsContext&) const override; 43 void replay(GraphicsContext&) const override;
(...skipping 22 matching lines...) Expand all
66 const bool m_knownToBeOpaque; 66 const bool m_knownToBeOpaque;
67 67
68 #if ENABLE(ASSERT) 68 #if ENABLE(ASSERT)
69 UnderInvalidationCheckingMode m_underInvalidationCheckingMode; 69 UnderInvalidationCheckingMode m_underInvalidationCheckingMode;
70 #endif 70 #endif
71 }; 71 };
72 72
73 } // namespace blink 73 } // namespace blink
74 74
75 #endif // DrawingDisplayItem_h 75 #endif // DrawingDisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698