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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.h
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index 8a044673919c29b9ebf53279d0b39658c549a941..eaf762d0e26972eaacd8ae48d8501a1cf22737f6 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -126,6 +126,9 @@ private:
bool createStencilAttachmentForRenderTarget(GrRenderTarget* rt, int width, int height) override;
bool attachStencilAttachmentToRenderTarget(GrStencilAttachment* sb,
GrRenderTarget* rt) override;
+ // Given a GrPixelConfig return the index into the stencil format array on GrGLCaps to a
+ // compatible stencil format.
+ int getCompatibleStencilIndex(GrPixelConfig config);
void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override;
@@ -489,9 +492,9 @@ private:
///@}
- // we record what stencil format worked last time to hopefully exit early
- // from our loop that tries stencil formats and calls check fb status.
- int fLastSuccessfulStencilFmtIdx;
+ // Mapping of pixel configs to known supported stencil formats to be used
+ // when adding a stencil buffer to a framebuffer.
+ int fPixelConfigToStencilIndex[kGrPixelConfigCnt];
typedef GrGpu INHERITED;
friend class GrGLPathRendering; // For accessing setTextureUnit.
« 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