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

Side by Side Diff: src/gpu/gl/GrGLCreateNullInterface.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 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 8
9 #include "gl/GrGLInterface.h" 9 #include "gl/GrGLInterface.h"
10 #include "GrGLDefines.h" 10 #include "GrGLDefines.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 GrGLuint id = 0; 118 GrGLuint id = 0;
119 119
120 switch (target) { 120 switch (target) {
121 case GR_GL_ARRAY_BUFFER: 121 case GR_GL_ARRAY_BUFFER:
122 id = gCurrArrayBuffer; 122 id = gCurrArrayBuffer;
123 break; 123 break;
124 case GR_GL_ELEMENT_ARRAY_BUFFER: 124 case GR_GL_ELEMENT_ARRAY_BUFFER:
125 id = gCurrElementArrayBuffer; 125 id = gCurrElementArrayBuffer;
126 break; 126 break;
127 default: 127 default:
128 GrCrash("Unexpected target to nullGLBufferData"); 128 SkFAIL("Unexpected target to nullGLBufferData");
129 break; 129 break;
130 } 130 }
131 131
132 if (id > 0) { 132 if (id > 0) {
133 GrBufferObj* buffer = look_up(id); 133 GrBufferObj* buffer = look_up(id);
134 buffer->allocate(size, (const GrGLchar*) data); 134 buffer->allocate(size, (const GrGLchar*) data);
135 } 135 }
136 } 136 }
137 137
138 GrGLvoid GR_GL_FUNCTION_TYPE nullGLPixelStorei(GrGLenum pname, GrGLint param) {} 138 GrGLvoid GR_GL_FUNCTION_TYPE nullGLPixelStorei(GrGLenum pname, GrGLint param) {}
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 break; 244 break;
245 } 245 }
246 if (id > 0) { 246 if (id > 0) {
247 GrBufferObj* buffer = look_up(id); 247 GrBufferObj* buffer = look_up(id);
248 if (buffer->mapped()) { 248 if (buffer->mapped()) {
249 *params = GR_GL_TRUE; 249 *params = GR_GL_TRUE;
250 } 250 }
251 } 251 }
252 break; } 252 break; }
253 default: 253 default:
254 GrCrash("Unexpected pname to GetBufferParamateriv"); 254 SkFAIL("Unexpected pname to GetBufferParamateriv");
255 break; 255 break;
256 } 256 }
257 }; 257 };
258 258
259 } // end anonymous namespace 259 } // end anonymous namespace
260 260
261 const GrGLInterface* GrGLCreateNullInterface() { 261 const GrGLInterface* GrGLCreateNullInterface() {
262 GrGLInterface* interface = SkNEW(GrGLInterface); 262 GrGLInterface* interface = SkNEW(GrGLInterface);
263 263
264 interface->fStandard = kGL_GrGLStandard; 264 interface->fStandard = kGL_GrGLStandard;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 functions->fMapBuffer = nullGLMapBuffer; 390 functions->fMapBuffer = nullGLMapBuffer;
391 functions->fMatrixLoadf = noOpGLMatrixLoadf; 391 functions->fMatrixLoadf = noOpGLMatrixLoadf;
392 functions->fMatrixLoadIdentity = noOpGLMatrixLoadIdentity; 392 functions->fMatrixLoadIdentity = noOpGLMatrixLoadIdentity;
393 functions->fUnmapBuffer = nullGLUnmapBuffer; 393 functions->fUnmapBuffer = nullGLUnmapBuffer;
394 functions->fBindFragDataLocationIndexed = noOpGLBindFragDataLocationIndexed; 394 functions->fBindFragDataLocationIndexed = noOpGLBindFragDataLocationIndexed;
395 395
396 interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functio ns->fGetStringi, 396 interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functio ns->fGetStringi,
397 functions->fGetIntegerv); 397 functions->fGetIntegerv);
398 return interface; 398 return interface;
399 } 399 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698