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

Side by Side Diff: include/private/SkTArray.h

Issue 1717393002: Add "sample locations" feature to GrProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_getmultisamp
Patch Set: vk stubs Created 4 years, 9 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 | « include/gpu/GrProcessor.h ('k') | src/gpu/GrGpu.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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 SkTArray_DEFINED 8 #ifndef SkTArray_DEFINED
9 #define SkTArray_DEFINED 9 #define SkTArray_DEFINED
10 10
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 179
180 /** 180 /**
181 * Version of above that uses a copy constructor to initialize all n items 181 * Version of above that uses a copy constructor to initialize all n items
182 * to the same T. 182 * to the same T.
183 */ 183 */
184 T* push_back_n(int n, const T& t) { 184 T* push_back_n(int n, const T& t) {
185 SkASSERT(n >= 0); 185 SkASSERT(n >= 0);
186 T* newTs = reinterpret_cast<T*>(this->push_back_raw(n)); 186 T* newTs = reinterpret_cast<T*>(this->push_back_raw(n));
187 for (int i = 0; i < n; ++i) { 187 for (int i = 0; i < n; ++i) {
188 new (newTs[i]) T(t); 188 new (newTs + i) T(t);
189 } 189 }
190 return newTs; 190 return newTs;
191 } 191 }
192 192
193 /** 193 /**
194 * Version of above that uses a copy constructor to initialize the n items 194 * Version of above that uses a copy constructor to initialize the n items
195 * to separate T values. 195 * to separate T values.
196 */ 196 */
197 T* push_back_n(int n, const T t[]) { 197 T* push_back_n(int n, const T t[]) {
198 SkASSERT(n >= 0); 198 SkASSERT(n >= 0);
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 SkSTArray& operator= (const INHERITED& array) { 506 SkSTArray& operator= (const INHERITED& array) {
507 INHERITED::operator=(array); 507 INHERITED::operator=(array);
508 return *this; 508 return *this;
509 } 509 }
510 510
511 private: 511 private:
512 SkAlignedSTStorage<N,T> fStorage; 512 SkAlignedSTStorage<N,T> fStorage;
513 }; 513 };
514 514
515 #endif 515 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrProcessor.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698