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

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

Issue 1451683002: Initial version of external_oes texture support and unit test (Closed) Base URL: https://skia.googlesource.com/skia.git@target
Patch Set: again Created 5 years 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // that ID is bound. If not the surface is temporarily bound to a FBO and th at FBO is bound. 315 // that ID is bound. If not the surface is temporarily bound to a FBO and th at FBO is bound.
316 // This must be paired with a call to unbindSurfaceFBOForCopy(). 316 // This must be paired with a call to unbindSurfaceFBOForCopy().
317 void bindSurfaceFBOForCopy(GrSurface* surface, GrGLenum fboTarget, GrGLIRect * viewport, 317 void bindSurfaceFBOForCopy(GrSurface* surface, GrGLenum fboTarget, GrGLIRect * viewport,
318 TempFBOTarget tempFBOTarget); 318 TempFBOTarget tempFBOTarget);
319 319
320 // Must be called if bindSurfaceFBOForCopy was used to bind a surface for co pying. 320 // Must be called if bindSurfaceFBOForCopy was used to bind a surface for co pying.
321 void unbindTextureFBOForCopy(GrGLenum fboTarget, GrSurface* surface); 321 void unbindTextureFBOForCopy(GrGLenum fboTarget, GrSurface* surface);
322 322
323 SkAutoTUnref<GrGLContext> fGLContext; 323 SkAutoTUnref<GrGLContext> fGLContext;
324 324
325 void createCopyProgram(); 325 void createCopyPrograms();
326 326
327 // GL program-related state 327 // GL program-related state
328 ProgramCache* fProgramCache; 328 ProgramCache* fProgramCache;
329 329
330 /////////////////////////////////////////////////////////////////////////// 330 ///////////////////////////////////////////////////////////////////////////
331 ///@name Caching of GL State 331 ///@name Caching of GL State
332 ///@{ 332 ///@{
333 int fHWActiveTextureUnitIdx; 333 int fHWActiveTextureUnitIdx;
334 GrGLuint fHWProgramID; 334 GrGLuint fHWProgramID;
335 335
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 fEnabled = kUnknown_TriState; 490 fEnabled = kUnknown_TriState;
491 } 491 }
492 } fHWBlendState; 492 } fHWBlendState;
493 493
494 /** IDs for copy surface program. */ 494 /** IDs for copy surface program. */
495 struct { 495 struct {
496 GrGLuint fProgram; 496 GrGLuint fProgram;
497 GrGLint fTextureUniform; 497 GrGLint fTextureUniform;
498 GrGLint fTexCoordXformUniform; 498 GrGLint fTexCoordXformUniform;
499 GrGLint fPosXformUniform; 499 GrGLint fPosXformUniform;
500 GrGLuint fArrayBuffer; 500 } fCopyPrograms[2];
501 } fCopyProgram; 501 GrGLuint fCopyProgramArrayBuffer;
502
503 static int TextureTargetToCopyProgramIdx(GrGLenum target) {
504 if (target == GR_GL_TEXTURE_2D) {
505 return 0;
506 } else {
507 SkASSERT(target == GR_GL_TEXTURE_EXTERNAL);
508 return 1;
509 }
510 }
502 511
503 TriState fMSAAEnabled; 512 TriState fMSAAEnabled;
504 513
505 GrStencilSettings fHWStencilSettings; 514 GrStencilSettings fHWStencilSettings;
506 TriState fHWStencilTestEnabled; 515 TriState fHWStencilTestEnabled;
507 516
508 517
509 GrPipelineBuilder::DrawFace fHWDrawFace; 518 GrPipelineBuilder::DrawFace fHWDrawFace;
510 TriState fHWWriteToColor; 519 TriState fHWWriteToColor;
511 uint32_t fHWBoundRenderTargetUniqueID; 520 uint32_t fHWBoundRenderTargetUniqueID;
512 TriState fHWSRGBFramebuffer; 521 TriState fHWSRGBFramebuffer;
513 SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs; 522 SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs;
514 523
515 ///@} 524 ///@}
516 525
517 // Mapping of pixel configs to known supported stencil formats to be used 526 // Mapping of pixel configs to known supported stencil formats to be used
518 // when adding a stencil buffer to a framebuffer. 527 // when adding a stencil buffer to a framebuffer.
519 int fPixelConfigToStencilIndex[kGrPixelConfigCnt]; 528 int fPixelConfigToStencilIndex[kGrPixelConfigCnt];
520 529
521 typedef GrGpu INHERITED; 530 typedef GrGpu INHERITED;
522 friend class GrGLPathRendering; // For accessing setTextureUnit. 531 friend class GrGLPathRendering; // For accessing setTextureUnit.
523 }; 532 };
524 533
525 #endif 534 #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