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

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

Issue 1530713002: make alpha read back of bgra/rgba work (Closed) Base URL: https://skia.googlesource.com/skia.git@align
Patch Set: cleanup 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/GrProgramDesc.h ('k') | src/gpu/gl/GrGLCaps.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 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte nt. 229 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte nt.
230 bool useNonVBOVertexAndIndexDynamicData() const { 230 bool useNonVBOVertexAndIndexDynamicData() const {
231 return fUseNonVBOVertexAndIndexDynamicData; 231 return fUseNonVBOVertexAndIndexDynamicData;
232 } 232 }
233 233
234 /// Does ReadPixels support the provided format/type combo? 234 /// Does ReadPixels support the provided format/type combo?
235 bool readPixelsSupported(const GrGLInterface* intf, 235 bool readPixelsSupported(const GrGLInterface* intf,
236 GrGLenum format, 236 GrGLenum format,
237 GrGLenum type, 237 GrGLenum type,
238 GrGLenum currFboFormat) const; 238 GrPixelConfig currRTConfig) const;
239 239
240 bool isCoreProfile() const { return fIsCoreProfile; } 240 bool isCoreProfile() const { return fIsCoreProfile; }
241 241
242 bool bindFragDataLocationSupport() const { return fBindFragDataLocationSuppo rt; } 242 bool bindFragDataLocationSupport() const { return fBindFragDataLocationSuppo rt; }
243 243
244 bool bindUniformLocationSupport() const { return fBindUniformLocationSupport ; } 244 bool bindUniformLocationSupport() const { return fBindUniformLocationSupport ; }
245 245
246 /// Are textures with GL_TEXTURE_EXTERNAL_OES type supported. 246 /// Are textures with GL_TEXTURE_EXTERNAL_OES type supported.
247 bool externalTextureSupport() const { return fExternalTextureSupport; } 247 bool externalTextureSupport() const { return fExternalTextureSupport; }
248 248
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 bool fUseNonVBOVertexAndIndexDynamicData : 1; 371 bool fUseNonVBOVertexAndIndexDynamicData : 1;
372 bool fIsCoreProfile : 1; 372 bool fIsCoreProfile : 1;
373 bool fBindFragDataLocationSupport : 1; 373 bool fBindFragDataLocationSupport : 1;
374 bool fSRGBWriteControl : 1; 374 bool fSRGBWriteControl : 1;
375 bool fRGBA8888PixelsOpsAreSlow : 1; 375 bool fRGBA8888PixelsOpsAreSlow : 1;
376 bool fPartialFBOReadIsSlow : 1; 376 bool fPartialFBOReadIsSlow : 1;
377 bool fBindUniformLocationSupport : 1; 377 bool fBindUniformLocationSupport : 1;
378 bool fExternalTextureSupport : 1; 378 bool fExternalTextureSupport : 1;
379 379
380 struct ReadPixelsSupportedFormat { 380 struct ReadPixelsSupportedFormat {
381 GrGLenum fFormat; 381 ReadPixelsSupportedFormat() { memset(this, 0, sizeof(ReadPixelsSupported Format)); }
382 GrGLenum fType; 382 ReadPixelsSupportedFormat(GrGLenum format, GrGLenum type, GrPixelConfig rtConfig) {
383 GrGLenum fFboFormat; 383 memset(this, 0, sizeof(ReadPixelsSupportedFormat));
384 fFormat = format;
385 fType = type;
386 fRTConfig = rtConfig;
387 }
388
389 GrGLenum fFormat;
390 GrGLenum fType;
391 GrPixelConfig fRTConfig;
384 392
385 bool operator==(const ReadPixelsSupportedFormat& rhs) const { 393 bool operator==(const ReadPixelsSupportedFormat& rhs) const {
386 return fFormat == rhs.fFormat 394 return fFormat == rhs.fFormat
387 && fType == rhs.fType 395 && fType == rhs.fType
388 && fFboFormat == rhs.fFboFormat; 396 && fRTConfig == rhs.fRTConfig;
389 } 397 }
390 }; 398 };
391 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach e; 399 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach e;
392 400
393 typedef GrCaps INHERITED; 401 typedef GrCaps INHERITED;
394 }; 402 };
395 403
396 #endif 404 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrProgramDesc.h ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698