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

Side by Side Diff: src/gpu/gl/GrGLGpu.h

Issue 1583863002: Beginning of support for texture rectangles. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 11 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/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLGpu.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 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 #ifndef GrGLGpu_DEFINED 8 #ifndef GrGLGpu_DEFINED
9 #define GrGLGpu_DEFINED 9 #define GrGLGpu_DEFINED
10 10
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 TriState fHWSRGBFramebuffer; 517 TriState fHWSRGBFramebuffer;
518 SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs; 518 SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs;
519 ///@} 519 ///@}
520 520
521 /** IDs for copy surface program. */ 521 /** IDs for copy surface program. */
522 struct { 522 struct {
523 GrGLuint fProgram; 523 GrGLuint fProgram;
524 GrGLint fTextureUniform; 524 GrGLint fTextureUniform;
525 GrGLint fTexCoordXformUniform; 525 GrGLint fTexCoordXformUniform;
526 GrGLint fPosXformUniform; 526 GrGLint fPosXformUniform;
527 } fCopyPrograms[2]; 527 } fCopyPrograms[3];
528 GrGLuint fCopyProgramArrayBuffer; 528 GrGLuint fCopyProgramArrayBuffer;
529 529
530 struct { 530 struct {
531 GrGLuint fProgram; 531 GrGLuint fProgram;
532 GrGLint fColorUniform; 532 GrGLint fColorUniform;
533 GrGLint fRectUniform; 533 GrGLint fRectUniform;
534 } fWireRectProgram; 534 } fWireRectProgram;
535 GrGLuint fWireRectArrayBuffer; 535 GrGLuint fWireRectArrayBuffer;
536 536
537 static int TextureTargetToCopyProgramIdx(GrGLenum target) { 537 static int TextureTargetToCopyProgramIdx(GrGLenum target) {
538 if (target == GR_GL_TEXTURE_2D) { 538 switch (target) {
539 return 0; 539 case GR_GL_TEXTURE_2D:
540 } else { 540 return 0;
541 SkASSERT(target == GR_GL_TEXTURE_EXTERNAL); 541 case GR_GL_TEXTURE_EXTERNAL:
542 return 1; 542 return 1;
543 case GR_GL_TEXTURE_RECTANGLE:
544 return 2;
545 default:
546 SkFAIL("Unexpected texture target type.");
547 return 0;
543 } 548 }
544 } 549 }
545 550
546 typedef GrGpu INHERITED; 551 typedef GrGpu INHERITED;
547 friend class GrGLPathRendering; // For accessing setTextureUnit. 552 friend class GrGLPathRendering; // For accessing setTextureUnit.
548 }; 553 };
549 554
550 #endif 555 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698