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

Side by Side Diff: src/gpu/gl/GrGLNoOpInterface.cpp

Issue 216503004: SK_SUPPORT_LEGACY_GRTYPES to hide duplicate types from SkTypes.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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
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 "GrGLNoOpInterface.h" 8 #include "GrGLNoOpInterface.h"
9 #include "SkString.h" 9 #include "SkString.h"
10 #include "SkThread.h" 10 #include "SkThread.h"
(...skipping 19 matching lines...) Expand all
30 "GL_EXT_blend_color", 30 "GL_EXT_blend_color",
31 "GL_EXT_stencil_wrap" 31 "GL_EXT_stencil_wrap"
32 }; 32 };
33 33
34 namespace { 34 namespace {
35 const GrGLubyte* combined_extensions_string() { 35 const GrGLubyte* combined_extensions_string() {
36 static SkString gExtString; 36 static SkString gExtString;
37 static SkMutex gMutex; 37 static SkMutex gMutex;
38 gMutex.acquire(); 38 gMutex.acquire();
39 if (0 == gExtString.size()) { 39 if (0 == gExtString.size()) {
40 for (size_t i = 0; i < GR_ARRAY_COUNT(kExtensions) - 1; ++i) { 40 for (size_t i = 0; i < SK_ARRAY_COUNT(kExtensions) - 1; ++i) {
41 gExtString.append(kExtensions[i]); 41 gExtString.append(kExtensions[i]);
42 gExtString.append(" "); 42 gExtString.append(" ");
43 } 43 }
44 gExtString.append(kExtensions[GR_ARRAY_COUNT(kExtensions) - 1]); 44 gExtString.append(kExtensions[SK_ARRAY_COUNT(kExtensions) - 1]);
45 } 45 }
46 gMutex.release(); 46 gMutex.release();
47 return (const GrGLubyte*) gExtString.c_str(); 47 return (const GrGLubyte*) gExtString.c_str();
48 } 48 }
49 } 49 }
50 50
51 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendColor(GrGLclampf red, 51 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendColor(GrGLclampf red,
52 GrGLclampf green, 52 GrGLclampf green,
53 GrGLclampf blue, 53 GrGLclampf blue,
54 GrGLclampf alpha) { 54 GrGLclampf alpha) {
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 case GR_GL_MAX_SAMPLES: 502 case GR_GL_MAX_SAMPLES:
503 *params = 32; 503 *params = 32;
504 break; 504 break;
505 case GR_GL_MAX_VERTEX_ATTRIBS: 505 case GR_GL_MAX_VERTEX_ATTRIBS:
506 *params = kDefaultMaxVertexAttribs; 506 *params = kDefaultMaxVertexAttribs;
507 break; 507 break;
508 case GR_GL_MAX_VARYING_VECTORS: 508 case GR_GL_MAX_VARYING_VECTORS:
509 *params = kDefaultMaxVaryingVectors; 509 *params = kDefaultMaxVaryingVectors;
510 break; 510 break;
511 case GR_GL_NUM_EXTENSIONS: 511 case GR_GL_NUM_EXTENSIONS:
512 *params = GR_ARRAY_COUNT(kExtensions); 512 *params = SK_ARRAY_COUNT(kExtensions);
513 break; 513 break;
514 default: 514 default:
515 GrCrash("Unexpected pname to GetIntegerv"); 515 GrCrash("Unexpected pname to GetIntegerv");
516 } 516 }
517 } 517 }
518 518
519 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetInfoLog(GrGLuint program, 519 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLGetInfoLog(GrGLuint program,
520 GrGLsizei bufsize, 520 GrGLsizei bufsize,
521 GrGLsizei* length, 521 GrGLsizei* length,
522 char* infolog) { 522 char* infolog) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 return (const GrGLubyte*)"The Debug (Non-)Renderer"; 616 return (const GrGLubyte*)"The Debug (Non-)Renderer";
617 default: 617 default:
618 GrCrash("Unexpected name passed to GetString"); 618 GrCrash("Unexpected name passed to GetString");
619 return NULL; 619 return NULL;
620 } 620 }
621 } 621 }
622 622
623 const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetStringi(GrGLenum name, GrGLuint i) { 623 const GrGLubyte* GR_GL_FUNCTION_TYPE noOpGLGetStringi(GrGLenum name, GrGLuint i) {
624 switch (name) { 624 switch (name) {
625 case GR_GL_EXTENSIONS: 625 case GR_GL_EXTENSIONS:
626 if (static_cast<size_t>(i) <= GR_ARRAY_COUNT(kExtensions)) { 626 if (static_cast<size_t>(i) <= SK_ARRAY_COUNT(kExtensions)) {
627 return (const GrGLubyte*) kExtensions[i]; 627 return (const GrGLubyte*) kExtensions[i];
628 } else { 628 } else {
629 return NULL; 629 return NULL;
630 } 630 }
631 default: 631 default:
632 GrCrash("Unexpected name passed to GetStringi"); 632 GrCrash("Unexpected name passed to GetStringi");
633 return NULL; 633 return NULL;
634 } 634 }
635 } 635 }
636 636
(...skipping 10 matching lines...) Expand all
647 static int gUniLocation = 0; 647 static int gUniLocation = 0;
648 return ++gUniLocation; 648 return ++gUniLocation;
649 } 649 }
650 650
651 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const cha r* marker) { 651 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const cha r* marker) {
652 } 652 }
653 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length , const cha r* marker) { 653 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length , const cha r* marker) {
654 } 654 }
655 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker() { 655 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker() {
656 } 656 }
OLDNEW
« include/gpu/GrPoint.h ('K') | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698