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

Side by Side Diff: include/gpu/GrTypes.h

Issue 691133003: Cleanup: Remove GR_ARRAY_COUNT macro. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | no next file » | 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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 template <typename T> const T& GrMin(const T& a, const T& b) { 64 template <typename T> const T& GrMin(const T& a, const T& b) {
65 return (a < b) ? a : b; 65 return (a < b) ? a : b;
66 } 66 }
67 67
68 template <typename T> const T& GrMax(const T& a, const T& b) { 68 template <typename T> const T& GrMax(const T& a, const T& b) {
69 return (b < a) ? a : b; 69 return (b < a) ? a : b;
70 } 70 }
71 71
72 /** 72 /**
73 * Count elements in an array
74 */
75 #define GR_ARRAY_COUNT(array) SK_ARRAY_COUNT(array)
76
77 /**
78 * 16.16 fixed point type 73 * 16.16 fixed point type
79 */ 74 */
80 typedef int32_t GrFixed; 75 typedef int32_t GrFixed;
81 76
82 #ifdef SK_DEBUG 77 #ifdef SK_DEBUG
83 78
84 static inline int16_t GrToS16(intptr_t x) { 79 static inline int16_t GrToS16(intptr_t x) {
85 SkASSERT((int16_t)x == x); 80 SkASSERT((int16_t)x == x);
86 return (int16_t)x; 81 return (int16_t)x;
87 } 82 }
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 public: 715 public:
721 GrAutoMalloc() : INHERITED() {} 716 GrAutoMalloc() : INHERITED() {}
722 explicit GrAutoMalloc(size_t size) : INHERITED(size) {} 717 explicit GrAutoMalloc(size_t size) : INHERITED(size) {}
723 virtual ~GrAutoMalloc() {} 718 virtual ~GrAutoMalloc() {}
724 private: 719 private:
725 typedef GrAutoMallocBaseType INHERITED; 720 typedef GrAutoMallocBaseType INHERITED;
726 }; 721 };
727 722
728 #undef GrAutoMallocBaseType 723 #undef GrAutoMallocBaseType
729 #endif 724 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698