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

Side by Side Diff: src/gpu/GrStencil.h

Issue 22850006: Replace uses of GrAssert by SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrResourceCache.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.cpp » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 #ifndef GrStencil_DEFINED 10 #ifndef GrStencil_DEFINED
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 void invalidate() { 278 void invalidate() {
279 // write an illegal value to the first member 279 // write an illegal value to the first member
280 fPassOps[0] = (GrStencilOp)(uint8_t)-1; 280 fPassOps[0] = (GrStencilOp)(uint8_t)-1;
281 fFlags = 0; 281 fFlags = 0;
282 } 282 }
283 283
284 bool operator == (const GrStencilSettings& s) const { 284 bool operator == (const GrStencilSettings& s) const {
285 static const size_t gCompareSize = sizeof(GrStencilSettings) - 285 static const size_t gCompareSize = sizeof(GrStencilSettings) -
286 sizeof(fFlags); 286 sizeof(fFlags);
287 GrAssert((const char*)&fFlags + sizeof(fFlags) == 287 SkASSERT((const char*)&fFlags + sizeof(fFlags) ==
288 (const char*)this + sizeof(GrStencilSettings)); 288 (const char*)this + sizeof(GrStencilSettings));
289 if (this->isDisabled() & s.isDisabled()) { // using & not && 289 if (this->isDisabled() & s.isDisabled()) { // using & not &&
290 return true; 290 return true;
291 } 291 }
292 return 0 == memcmp(this, &s, gCompareSize); 292 return 0 == memcmp(this, &s, gCompareSize);
293 } 293 }
294 294
295 bool operator != (const GrStencilSettings& s) const { 295 bool operator != (const GrStencilSettings& s) const {
296 return !(*this == s); 296 return !(*this == s);
297 } 297 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 *GR_CONST_STENCIL_SETTINGS_PTR_FROM_STRUCT_PTR(&(NAME ## _STRUCT)); 386 *GR_CONST_STENCIL_SETTINGS_PTR_FROM_STRUCT_PTR(&(NAME ## _STRUCT));
387 387
388 388
389 #define GR_STATIC_CONST_SAME_STENCIL(NAME, \ 389 #define GR_STATIC_CONST_SAME_STENCIL(NAME, \
390 PASS_OP, FAIL_OP, FUNC, MASK, REF, WRITE_MASK) \ 390 PASS_OP, FAIL_OP, FUNC, MASK, REF, WRITE_MASK) \
391 GR_STATIC_CONST_STENCIL(NAME, (PASS_OP), (PASS_OP), (FAIL_OP), \ 391 GR_STATIC_CONST_STENCIL(NAME, (PASS_OP), (PASS_OP), (FAIL_OP), \
392 (FAIL_OP), (FUNC), (FUNC), (MASK), (MASK), (REF), (REF), (WRITE_MASK), \ 392 (FAIL_OP), (FUNC), (FUNC), (MASK), (MASK), (REF), (REF), (WRITE_MASK), \
393 (WRITE_MASK)) 393 (WRITE_MASK))
394 394
395 #endif 395 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrResourceCache.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698