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

Side by Side Diff: include/core/SkTypes.h

Issue 414493002: Revert "Revert of Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL when te… (Closed) Base URL: https://skia.googlesource.com/skia.git@removestuff
Patch Set: Address round 2 of comments Created 6 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
« no previous file with comments | « no previous file | include/gpu/GrCacheable.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkTypes_DEFINED 8 #ifndef SkTypes_DEFINED
9 #define SkTypes_DEFINED 9 #define SkTypes_DEFINED
10 10
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 /** Returns a < b for milliseconds, correctly handling wrap-around from 0xFFFFFF FF to 0 318 /** Returns a < b for milliseconds, correctly handling wrap-around from 0xFFFFFF FF to 0
319 */ 319 */
320 #define SkMSec_LT(a, b) ((int32_t)(a) - (int32_t)(b) < 0) 320 #define SkMSec_LT(a, b) ((int32_t)(a) - (int32_t)(b) < 0)
321 /** Returns a <= b for milliseconds, correctly handling wrap-around from 0xFFFFF FFF to 0 321 /** Returns a <= b for milliseconds, correctly handling wrap-around from 0xFFFFF FFF to 0
322 */ 322 */
323 #define SkMSec_LE(a, b) ((int32_t)(a) - (int32_t)(b) <= 0) 323 #define SkMSec_LE(a, b) ((int32_t)(a) - (int32_t)(b) <= 0)
324 324
325 /** The generation IDs in Skia reserve 0 has an invalid marker. 325 /** The generation IDs in Skia reserve 0 has an invalid marker.
326 */ 326 */
327 #define SK_InvalidGenID 0 327 #define SK_InvalidGenID 0
328 /** The unique IDs in Skia reserve 0 has an invalid marker.
329 */
330 #define SK_InvalidUniqueID 0
328 331
329 /**************************************************************************** 332 /****************************************************************************
330 The rest of these only build with C++ 333 The rest of these only build with C++
331 */ 334 */
332 #ifdef __cplusplus 335 #ifdef __cplusplus
333 336
334 /** Faster than SkToBool for integral conditions. Returns 0 or 1 337 /** Faster than SkToBool for integral conditions. Returns 0 or 1
335 */ 338 */
336 static inline int Sk32ToBool(uint32_t n) { 339 static inline int Sk32ToBool(uint32_t n) {
337 return (n | (0-n)) >> 31; 340 return (n | (0-n)) >> 31;
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 private: 665 private:
663 void* fPtr; 666 void* fPtr;
664 size_t fSize; // can be larger than the requested size (see kReuse) 667 size_t fSize; // can be larger than the requested size (see kReuse)
665 uint32_t fStorage[(kSize + 3) >> 2]; 668 uint32_t fStorage[(kSize + 3) >> 2];
666 }; 669 };
667 // Can't guard the constructor because it's a template class. 670 // Can't guard the constructor because it's a template class.
668 671
669 #endif /* C++ */ 672 #endif /* C++ */
670 673
671 #endif 674 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrCacheable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698