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

Side by Side Diff: src/gpu/GrGpu.cpp

Issue 257393004: Convert GrCrash->SkFAIL GrDebugCrash->SkDEBUGFAIL (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: whitespace change Created 6 years, 7 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
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 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 kInvert_StencilOp, 258 kInvert_StencilOp,
259 kAlwaysIfInClip_StencilFunc, 259 kAlwaysIfInClip_StencilFunc,
260 0xFFFF, 0xFFFF, 0xFFFF); 260 0xFFFF, 0xFFFF, 0xFFFF);
261 return *GR_CONST_STENCIL_SETTINGS_PTR_FROM_STRUCT_PTR(&gSettings); 261 return *GR_CONST_STENCIL_SETTINGS_PTR_FROM_STRUCT_PTR(&gSettings);
262 } 262 }
263 263
264 void GrGpu::getPathStencilSettingsForFillType(SkPath::FillType fill, GrStencilSe ttings* outStencilSettings) { 264 void GrGpu::getPathStencilSettingsForFillType(SkPath::FillType fill, GrStencilSe ttings* outStencilSettings) {
265 265
266 switch (fill) { 266 switch (fill) {
267 default: 267 default:
268 GrCrash("Unexpected path fill."); 268 SkFAIL("Unexpected path fill.");
269 /* fallthrough */; 269 /* fallthrough */;
270 case SkPath::kWinding_FillType: 270 case SkPath::kWinding_FillType:
271 case SkPath::kInverseWinding_FillType: 271 case SkPath::kInverseWinding_FillType:
272 *outStencilSettings = winding_path_stencil_settings(); 272 *outStencilSettings = winding_path_stencil_settings();
273 break; 273 break;
274 case SkPath::kEvenOdd_FillType: 274 case SkPath::kEvenOdd_FillType:
275 case SkPath::kInverseEvenOdd_FillType: 275 case SkPath::kInverseEvenOdd_FillType:
276 *outStencilSettings = even_odd_path_stencil_settings(); 276 *outStencilSettings = even_odd_path_stencil_settings();
277 break; 277 break;
278 } 278 }
(...skipping 27 matching lines...) Expand all
306 uint16_t* indices = (uint16_t*)fQuadIndexBuffer->lock(); 306 uint16_t* indices = (uint16_t*)fQuadIndexBuffer->lock();
307 if (NULL != indices) { 307 if (NULL != indices) {
308 fill_indices(indices, MAX_QUADS); 308 fill_indices(indices, MAX_QUADS);
309 fQuadIndexBuffer->unlock(); 309 fQuadIndexBuffer->unlock();
310 } else { 310 } else {
311 indices = (uint16_t*)sk_malloc_throw(SIZE); 311 indices = (uint16_t*)sk_malloc_throw(SIZE);
312 fill_indices(indices, MAX_QUADS); 312 fill_indices(indices, MAX_QUADS);
313 if (!fQuadIndexBuffer->updateData(indices, SIZE)) { 313 if (!fQuadIndexBuffer->updateData(indices, SIZE)) {
314 fQuadIndexBuffer->unref(); 314 fQuadIndexBuffer->unref();
315 fQuadIndexBuffer = NULL; 315 fQuadIndexBuffer = NULL;
316 GrCrash("Can't get indices into buffer!"); 316 SkFAIL("Can't get indices into buffer!");
317 } 317 }
318 sk_free(indices); 318 sk_free(indices);
319 } 319 }
320 } 320 }
321 } 321 }
322 322
323 return fQuadIndexBuffer; 323 return fQuadIndexBuffer;
324 } 324 }
325 325
326 //////////////////////////////////////////////////////////////////////////////// 326 ////////////////////////////////////////////////////////////////////////////////
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 } 550 }
551 551
552 void GrGpu::releaseIndexArray() { 552 void GrGpu::releaseIndexArray() {
553 // if index source was array, we stowed data in the pool 553 // if index source was array, we stowed data in the pool
554 const GeometrySrcState& geoSrc = this->getGeomSrc(); 554 const GeometrySrcState& geoSrc = this->getGeomSrc();
555 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); 555 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc);
556 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); 556 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t);
557 fIndexPool->putBack(bytes); 557 fIndexPool->putBack(bytes);
558 --fIndexPoolUseCnt; 558 --fIndexPoolUseCnt;
559 } 559 }
OLDNEW
« include/core/SkTypes.h ('K') | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698