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

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

Issue 1317443004: Calculate pixel config and stencil fmt pairs once per pixel config. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Unused variable Created 5 years, 3 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/GrGLCaps.cpp ('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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 GrGpuResource::LifeCycle lifeCycle, 119 GrGpuResource::LifeCycle lifeCycle,
120 const void* srcData) override; 120 const void* srcData) override;
121 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override; 121 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override;
122 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override; 122 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override;
123 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership ) override; 123 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership ) override;
124 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, 124 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&,
125 GrWrapOwnership) override; 125 GrWrapOwnership) override;
126 bool createStencilAttachmentForRenderTarget(GrRenderTarget* rt, int width, i nt height) override; 126 bool createStencilAttachmentForRenderTarget(GrRenderTarget* rt, int width, i nt height) override;
127 bool attachStencilAttachmentToRenderTarget(GrStencilAttachment* sb, 127 bool attachStencilAttachmentToRenderTarget(GrStencilAttachment* sb,
128 GrRenderTarget* rt) override; 128 GrRenderTarget* rt) override;
129 // Given a GrPixelConfig return the index into the stencil format array on G rGLCaps to a
130 // compatible stencil format.
131 int getCompatibleStencilIndex(GrPixelConfig config);
129 132
130 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; 133 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override;
131 134
132 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override; 135 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override;
133 136
134 bool onReadPixels(GrSurface*, 137 bool onReadPixels(GrSurface*,
135 int left, int top, 138 int left, int top,
136 int width, int height, 139 int width, int height,
137 GrPixelConfig, 140 GrPixelConfig,
138 void* buffer, 141 void* buffer,
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 485
483 GrPipelineBuilder::DrawFace fHWDrawFace; 486 GrPipelineBuilder::DrawFace fHWDrawFace;
484 TriState fHWWriteToColor; 487 TriState fHWWriteToColor;
485 TriState fHWDitherEnabled; 488 TriState fHWDitherEnabled;
486 uint32_t fHWBoundRenderTargetUniqueID; 489 uint32_t fHWBoundRenderTargetUniqueID;
487 TriState fHWSRGBFramebuffer; 490 TriState fHWSRGBFramebuffer;
488 SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs; 491 SkTArray<uint32_t, true> fHWBoundTextureUniqueIDs;
489 492
490 ///@} 493 ///@}
491 494
492 // we record what stencil format worked last time to hopefully exit early 495 // Mapping of pixel configs to known supported stencil formats to be used
493 // from our loop that tries stencil formats and calls check fb status. 496 // when adding a stencil buffer to a framebuffer.
494 int fLastSuccessfulStencilFmtIdx; 497 int fPixelConfigToStencilIndex[kGrPixelConfigCnt];
495 498
496 typedef GrGpu INHERITED; 499 typedef GrGpu INHERITED;
497 friend class GrGLPathRendering; // For accessing setTextureUnit. 500 friend class GrGLPathRendering; // For accessing setTextureUnit.
498 }; 501 };
499 502
500 #endif 503 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698