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

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

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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 | « src/gpu/GrMemoryPool.cpp ('k') | src/gpu/GrPaint.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 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "gl/builders/GrGLProgramBuilder.h" 8 #include "gl/builders/GrGLProgramBuilder.h"
9 #include "GrOvalRenderer.h" 9 #include "GrOvalRenderer.h"
10 10
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 // center 874 // center
875 // we place this at the end so that we can ignore these indices when renderi ng stroke-only 875 // we place this at the end so that we can ignore these indices when renderi ng stroke-only
876 5, 6, 10, 5, 10, 9 876 5, 6, 10, 5, 10, 9
877 }; 877 };
878 878
879 879
880 GrIndexBuffer* GrOvalRenderer::rRectIndexBuffer(GrGpu* gpu) { 880 GrIndexBuffer* GrOvalRenderer::rRectIndexBuffer(GrGpu* gpu) {
881 if (NULL == fRRectIndexBuffer) { 881 if (NULL == fRRectIndexBuffer) {
882 fRRectIndexBuffer = 882 fRRectIndexBuffer =
883 gpu->createIndexBuffer(sizeof(gRRectIndices), false); 883 gpu->createIndexBuffer(sizeof(gRRectIndices), false);
884 if (NULL != fRRectIndexBuffer) { 884 if (fRRectIndexBuffer) {
885 #ifdef SK_DEBUG 885 #ifdef SK_DEBUG
886 bool updated = 886 bool updated =
887 #endif 887 #endif
888 fRRectIndexBuffer->updateData(gRRectIndices, 888 fRRectIndexBuffer->updateData(gRRectIndices,
889 sizeof(gRRectIndices)); 889 sizeof(gRRectIndices));
890 GR_DEBUGASSERT(updated); 890 GR_DEBUGASSERT(updated);
891 } 891 }
892 } 892 }
893 return fRRectIndexBuffer; 893 return fRRectIndexBuffer;
894 } 894 }
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 1226
1227 // drop out the middle quad if we're stroked 1227 // drop out the middle quad if we're stroked
1228 int indexCnt = isStrokeOnly ? SK_ARRAY_COUNT(gRRectIndices) - 6 : 1228 int indexCnt = isStrokeOnly ? SK_ARRAY_COUNT(gRRectIndices) - 6 :
1229 SK_ARRAY_COUNT(gRRectIndices); 1229 SK_ARRAY_COUNT(gRRectIndices);
1230 target->setIndexSourceToBuffer(indexBuffer); 1230 target->setIndexSourceToBuffer(indexBuffer);
1231 target->drawIndexed(kTriangles_GrPrimitiveType, 0, 0, 16, indexCnt, &bou nds); 1231 target->drawIndexed(kTriangles_GrPrimitiveType, 0, 0, 16, indexCnt, &bou nds);
1232 } 1232 }
1233 1233
1234 return true; 1234 return true;
1235 } 1235 }
OLDNEW
« no previous file with comments | « src/gpu/GrMemoryPool.cpp ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698