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

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

Issue 376703009: Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL when textures and RTs are… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: now with 64 bits Created 6 years, 5 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/GrGLTexture.cpp ('k') | src/gpu/gl/GrGpuGL.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 GrGpuGL_DEFINED 8 #ifndef GrGpuGL_DEFINED
9 #define GrGpuGL_DEFINED 9 #define GrGpuGL_DEFINED
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // GrGLResource onRelease functions. 98 // GrGLResource onRelease functions.
99 void notifyVertexArrayDelete(GrGLuint id) { 99 void notifyVertexArrayDelete(GrGLuint id) {
100 fHWGeometryState.notifyVertexArrayDelete(id); 100 fHWGeometryState.notifyVertexArrayDelete(id);
101 } 101 }
102 void notifyVertexBufferDelete(GrGLuint id) { 102 void notifyVertexBufferDelete(GrGLuint id) {
103 fHWGeometryState.notifyVertexBufferDelete(id); 103 fHWGeometryState.notifyVertexBufferDelete(id);
104 } 104 }
105 void notifyIndexBufferDelete(GrGLuint id) { 105 void notifyIndexBufferDelete(GrGLuint id) {
106 fHWGeometryState.notifyIndexBufferDelete(id); 106 fHWGeometryState.notifyIndexBufferDelete(id);
107 } 107 }
108 void notifyTextureDelete(GrGLTexture* texture);
109 void notifyRenderTargetDelete(GrRenderTarget* renderTarget);
110 108
111 // These functions should be used to generate and delete GL path names. They have their own 109 // These functions should be used to generate and delete GL path names. They have their own
112 // allocator that runs on the client side, so they are much faster than goin g through GenPaths. 110 // allocator that runs on the client side, so they are much faster than goin g through GenPaths.
113 GrGLuint createGLPathObject(); 111 GrGLuint createGLPathObject();
114 void deleteGLPathObject(GrGLuint); 112 void deleteGLPathObject(GrGLuint);
115 113
116 protected: 114 protected:
117 virtual bool onCopySurface(GrSurface* dst, 115 virtual bool onCopySurface(GrSurface* dst,
118 GrSurface* src, 116 GrSurface* src,
119 const SkIRect& srcRect, 117 const SkIRect& srcRect,
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 455
458 GrGLProgram::MatrixState fHWProjectionMatrixState; 456 GrGLProgram::MatrixState fHWProjectionMatrixState;
459 457
460 GrStencilSettings fHWStencilSettings; 458 GrStencilSettings fHWStencilSettings;
461 TriState fHWStencilTestEnabled; 459 TriState fHWStencilTestEnabled;
462 GrStencilSettings fHWPathStencilSettings; 460 GrStencilSettings fHWPathStencilSettings;
463 461
464 GrDrawState::DrawFace fHWDrawFace; 462 GrDrawState::DrawFace fHWDrawFace;
465 TriState fHWWriteToColor; 463 TriState fHWWriteToColor;
466 TriState fHWDitherEnabled; 464 TriState fHWDitherEnabled;
467 GrRenderTarget* fHWBoundRenderTarget; 465 uint64_t fHWBoundRenderTargetInstanceID;
468 SkTArray<GrTexture*, true> fHWBoundTextures; 466 SkTArray<uint64_t, true> fHWBoundTextureInstanceIDs;
469 467
470 struct PathTexGenData { 468 struct PathTexGenData {
471 GrGLenum fMode; 469 GrGLenum fMode;
472 GrGLint fNumComponents; 470 GrGLint fNumComponents;
473 GrGLfloat fCoefficients[3 * 3]; 471 GrGLfloat fCoefficients[3 * 3];
474 }; 472 };
475 int fHWActivePathTexGenSets; 473 int fHWActivePathTexGenSets;
476 SkTArray<PathTexGenData, true> fHWPathTexGenSettings; 474 SkTArray<PathTexGenData, true> fHWPathTexGenSettings;
477 ///@} 475 ///@}
478 476
479 // we record what stencil format worked last time to hopefully exit early 477 // we record what stencil format worked last time to hopefully exit early
480 // from our loop that tries stencil formats and calls check fb status. 478 // from our loop that tries stencil formats and calls check fb status.
481 int fLastSuccessfulStencilFmtIdx; 479 int fLastSuccessfulStencilFmtIdx;
482 480
483 SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator; 481 SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator;
484 482
485 typedef GrGpu INHERITED; 483 typedef GrGpu INHERITED;
486 }; 484 };
487 485
488 #endif 486 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLTexture.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698