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

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

Issue 1420033005: Create swizzle table inside of glsl caps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleaning Created 5 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 8
9 #ifndef GrGLCaps_DEFINED 9 #ifndef GrGLCaps_DEFINED
10 #define GrGLCaps_DEFINED 10 #define GrGLCaps_DEFINED
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 bool rgba8888PixelsOpsAreSlow() const { return fRGBA8888PixelsOpsAreSlow; } 266 bool rgba8888PixelsOpsAreSlow() const { return fRGBA8888PixelsOpsAreSlow; }
267 bool partialFBOReadIsSlow() const { return fPartialFBOReadIsSlow; } 267 bool partialFBOReadIsSlow() const { return fPartialFBOReadIsSlow; }
268 268
269 const GrGLSLCaps* glslCaps() const { return reinterpret_cast<GrGLSLCaps*>(fS haderCaps.get()); } 269 const GrGLSLCaps* glslCaps() const { return reinterpret_cast<GrGLSLCaps*>(fS haderCaps.get()); }
270 270
271 private: 271 private:
272 void init(const GrContextOptions&, const GrGLContextInfo&, const GrGLInterfa ce*); 272 void init(const GrContextOptions&, const GrGLContextInfo&, const GrGLInterfa ce*);
273 void initGLSL(const GrGLContextInfo&); 273 void initGLSL(const GrGLContextInfo&);
274 bool hasPathRenderingSupport(const GrGLContextInfo&, const GrGLInterface*); 274 bool hasPathRenderingSupport(const GrGLContextInfo&, const GrGLInterface*);
275 275
276 void onApplyOptionsOverrides(const GrContextOptions& options) override;
277
276 /** 278 /**
277 * Maintains a bit per GrPixelConfig. It is used to avoid redundantly 279 * Maintains a bit per GrPixelConfig. It is used to avoid redundantly
278 * performing glCheckFrameBufferStatus for the same config. 280 * performing glCheckFrameBufferStatus for the same config.
279 */ 281 */
280 struct VerifiedColorConfigs { 282 struct VerifiedColorConfigs {
281 VerifiedColorConfigs() { 283 VerifiedColorConfigs() {
282 this->reset(); 284 this->reset();
283 } 285 }
284 286
285 void reset() { 287 void reset() {
(...skipping 30 matching lines...) Expand all
316 // This must be called after initFSAASupport(). 318 // This must be called after initFSAASupport().
317 void initConfigRenderableTable(const GrGLContextInfo&, bool srgbSupport); 319 void initConfigRenderableTable(const GrGLContextInfo&, bool srgbSupport);
318 void initConfigTexturableTable(const GrGLContextInfo&, const GrGLInterface*, bool srgbSupport); 320 void initConfigTexturableTable(const GrGLContextInfo&, const GrGLInterface*, bool srgbSupport);
319 321
320 bool doReadPixelsSupported(const GrGLInterface* intf, GrGLenum format, GrGLe num type) const; 322 bool doReadPixelsSupported(const GrGLInterface* intf, GrGLenum format, GrGLe num type) const;
321 323
322 void initShaderPrecisionTable(const GrGLContextInfo& ctxInfo, 324 void initShaderPrecisionTable(const GrGLContextInfo& ctxInfo,
323 const GrGLInterface* intf, 325 const GrGLInterface* intf,
324 GrGLSLCaps* glslCaps); 326 GrGLSLCaps* glslCaps);
325 327
328 void initConfigSwizzleTable(GrGLSLCaps* glslCaps);
329
326 // tracks configs that have been verified to pass the FBO completeness when 330 // tracks configs that have been verified to pass the FBO completeness when
327 // used as a color attachment 331 // used as a color attachment
328 VerifiedColorConfigs fVerifiedColorConfigs; 332 VerifiedColorConfigs fVerifiedColorConfigs;
329 333
330 SkTArray<StencilFormat, true> fStencilFormats; 334 SkTArray<StencilFormat, true> fStencilFormats;
331 335
332 int fMaxFragmentUniformVectors; 336 int fMaxFragmentUniformVectors;
333 int fMaxVertexAttributes; 337 int fMaxVertexAttributes;
334 int fMaxFragmentTextureUnits; 338 int fMaxFragmentTextureUnits;
335 339
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 && fType == rhs.fType 379 && fType == rhs.fType
376 && fFboFormat == rhs.fFboFormat; 380 && fFboFormat == rhs.fFboFormat;
377 } 381 }
378 }; 382 };
379 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach e; 383 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach e;
380 384
381 typedef GrCaps INHERITED; 385 typedef GrCaps INHERITED;
382 }; 386 };
383 387
384 #endif 388 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | src/gpu/glsl/GrGLSLCaps.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698