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

Side by Side Diff: src/gpu/GrAARectRenderer.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 #include "GrAARectRenderer.h" 8 #include "GrAARectRenderer.h"
9 #include "GrGpu.h" 9 #include "GrGpu.h"
10 #include "gl/GrGLEffect.h" 10 #include "gl/GrGLEffect.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // Each AA filled rect is drawn with 8 vertices and 10 triangles (8 around 320 // Each AA filled rect is drawn with 8 vertices and 10 triangles (8 around
321 // the inner rect (for AA) and 2 for the inner rect. 321 // the inner rect (for AA) and 2 for the inner rect.
322 int baseIdx = i * kIndicesPerAAFillRect; 322 int baseIdx = i * kIndicesPerAAFillRect;
323 uint16_t baseVert = (uint16_t)(i * kVertsPerAAFillRect); 323 uint16_t baseVert = (uint16_t)(i * kVertsPerAAFillRect);
324 for (int j = 0; j < kIndicesPerAAFillRect; ++j) { 324 for (int j = 0; j < kIndicesPerAAFillRect; ++j) {
325 data[baseIdx+j] = baseVert + gFillAARectIdx[j]; 325 data[baseIdx+j] = baseVert + gFillAARectIdx[j];
326 } 326 }
327 } 327 }
328 if (useTempData) { 328 if (useTempData) {
329 if (!fAAFillRectIndexBuffer->updateData(data, kAAFillRectIndexBu fferSize)) { 329 if (!fAAFillRectIndexBuffer->updateData(data, kAAFillRectIndexBu fferSize)) {
330 GrCrash("Can't get AA Fill Rect indices into buffer!"); 330 SkFAIL("Can't get AA Fill Rect indices into buffer!");
331 } 331 }
332 SkDELETE_ARRAY(data); 332 SkDELETE_ARRAY(data);
333 } else { 333 } else {
334 fAAFillRectIndexBuffer->unlock(); 334 fAAFillRectIndexBuffer->unlock();
335 } 335 }
336 } 336 }
337 } 337 }
338 338
339 return fAAFillRectIndexBuffer; 339 return fAAFillRectIndexBuffer;
340 } 340 }
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 combinedMatrix.mapPoints((SkPoint*)&devInside, (const SkPoint*)&rects[1], 2) ; 923 combinedMatrix.mapPoints((SkPoint*)&devInside, (const SkPoint*)&rects[1], 2) ;
924 924
925 if (devInside.isEmpty()) { 925 if (devInside.isEmpty()) {
926 this->fillAARect(gpu, target, devOutside, SkMatrix::I(), devOutside, use VertexCoverage); 926 this->fillAARect(gpu, target, devOutside, SkMatrix::I(), devOutside, use VertexCoverage);
927 return; 927 return;
928 } 928 }
929 929
930 this->geometryStrokeAARect(gpu, target, devOutside, devOutsideAssist, 930 this->geometryStrokeAARect(gpu, target, devOutside, devOutsideAssist,
931 devInside, useVertexCoverage, true); 931 devInside, useVertexCoverage, true);
932 } 932 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698