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

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

Issue 1497683002: Make platform/graphics to use USING_FAST_MALLOC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 CompositingReasons_h 5 #ifndef CompositingReasons_h
6 #define CompositingReasons_h 6 #define CompositingReasons_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "wtf/Allocator.h"
9 #include "wtf/MathExtras.h" 10 #include "wtf/MathExtras.h"
10 #include <stdint.h> 11 #include <stdint.h>
11 12
12 namespace blink { 13 namespace blink {
13 14
14 const uint64_t CompositingReasonNone = 0; 15 const uint64_t CompositingReasonNone = 0;
15 const uint64_t CompositingReasonAll = ~stat ic_cast<uint64_t>(0); 16 const uint64_t CompositingReasonAll = ~stat ic_cast<uint64_t>(0);
16 17
17 // Intrinsic reasons that can be known right away by the layer 18 // Intrinsic reasons that can be known right away by the layer
18 const uint64_t CompositingReason3DTransform = UINT6 4_C(1) << 0; 19 const uint64_t CompositingReason3DTransform = UINT6 4_C(1) << 0;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return reasons & ~CompositingReasonComboSquashableReasons; 186 return reasons & ~CompositingReasonComboSquashableReasons;
186 } 187 }
187 188
188 // If the layer has overlap or assumed overlap, but no other reasons, then it sh ould be squashed. 189 // If the layer has overlap or assumed overlap, but no other reasons, then it sh ould be squashed.
189 inline bool requiresSquashing(CompositingReasons reasons) 190 inline bool requiresSquashing(CompositingReasons reasons)
190 { 191 {
191 return !requiresCompositing(reasons) && (reasons & CompositingReasonComboSqu ashableReasons); 192 return !requiresCompositing(reasons) && (reasons & CompositingReasonComboSqu ashableReasons);
192 } 193 }
193 194
194 struct CompositingReasonStringMap { 195 struct CompositingReasonStringMap {
196 STACK_ALLOCATED();
195 CompositingReasons reason; 197 CompositingReasons reason;
196 const char* shortName; 198 const char* shortName;
197 const char* description; 199 const char* description;
198 }; 200 };
199 201
200 PLATFORM_EXPORT extern const CompositingReasonStringMap kCompositingReasonString Map[]; 202 PLATFORM_EXPORT extern const CompositingReasonStringMap kCompositingReasonString Map[];
201 PLATFORM_EXPORT extern size_t kNumberOfCompositingReasons; 203 PLATFORM_EXPORT extern size_t kNumberOfCompositingReasons;
202 204
203 } // namespace blink 205 } // namespace blink
204 206
205 #endif // CompositingReasons_h 207 #endif // CompositingReasons_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698