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

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

Issue 1693923002: Make copySurface work in more situations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 4 years, 10 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 | « no previous file | src/gpu/gl/GrGLCaps.cpp » ('j') | src/gpu/gl/GrGLGpu.cpp » ('J')
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 */ 70 */
71 kES_EXT_MsToTexture_MSFBOType, 71 kES_EXT_MsToTexture_MSFBOType,
72 /** 72 /**
73 * GL_NV_framebuffer_mixed_samples. 73 * GL_NV_framebuffer_mixed_samples.
74 */ 74 */
75 kMixedSamples_MSFBOType, 75 kMixedSamples_MSFBOType,
76 76
77 kLast_MSFBOType = kMixedSamples_MSFBOType 77 kLast_MSFBOType = kMixedSamples_MSFBOType
78 }; 78 };
79 79
80 enum BlitFramebufferSupport {
81 kNone_BlitFramebufferSupport,
82 /**
83 * ANGLE exposes a limited blit framebuffer extension that does not allo w for stretching
84 * or mirroring.
85 */
86 kNoScalingNoMirroring_BlitFramebufferSupport,
87 kFull_BlitFramebufferSupport
88 };
89
80 enum InvalidateFBType { 90 enum InvalidateFBType {
81 kNone_InvalidateFBType, 91 kNone_InvalidateFBType,
82 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer() 92 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer()
83 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer() 93 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer()
84 94
85 kLast_InvalidateFBType = kInvalidate_InvalidateFBType 95 kLast_InvalidateFBType = kInvalidate_InvalidateFBType
86 }; 96 };
87 97
88 enum MapBufferType { 98 enum MapBufferType {
89 kNone_MapBufferType, 99 kNone_MapBufferType,
90 kMapBuffer_MapBufferType, // glMapBuffer() 100 kMapBuffer_MapBufferType, // glMapBuffer()
91 kMapBufferRange_MapBufferType, // glMapBufferRange() 101 kMapBufferRange_MapBufferType, // glMapBufferRange()
92 kChromium_MapBufferType, // GL_CHROMIUM_map_sub 102 kChromium_MapBufferType, // GL_CHROMIUM_map_sub
93 103
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 bool isConfigVerifiedColorAttachment(GrPixelConfig config) const { 205 bool isConfigVerifiedColorAttachment(GrPixelConfig config) const {
196 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kVerifiedColor Attachment_Flag); 206 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kVerifiedColor Attachment_Flag);
197 } 207 }
198 208
199 /** 209 /**
200 * Reports the type of MSAA FBO support. 210 * Reports the type of MSAA FBO support.
201 */ 211 */
202 MSFBOType msFBOType() const { return fMSFBOType; } 212 MSFBOType msFBOType() const { return fMSFBOType; }
203 213
204 /** 214 /**
205 * Does the supported MSAA FBO extension have MSAA renderbuffers? 215 * Does the preferred MSAA FBO extension have MSAA renderbuffers?
206 */ 216 */
207 bool usesMSAARenderBuffers() const { 217 bool usesMSAARenderBuffers() const {
208 return kNone_MSFBOType != fMSFBOType && 218 return kNone_MSFBOType != fMSFBOType &&
209 kES_IMG_MsToTexture_MSFBOType != fMSFBOType && 219 kES_IMG_MsToTexture_MSFBOType != fMSFBOType &&
210 kES_EXT_MsToTexture_MSFBOType != fMSFBOType && 220 kES_EXT_MsToTexture_MSFBOType != fMSFBOType &&
211 kMixedSamples_MSFBOType != fMSFBOType; 221 kMixedSamples_MSFBOType != fMSFBOType;
212 } 222 }
213 223
214 /** 224 /**
robertphillips 2016/02/12 18:59:53 Hmmm, this comment doesn't seem quite right. This
bsalomon 2016/02/12 19:09:14 Done.
225 * Is glBlitFramebuffer supported? This may be true when usesMSAARenderBuffe rs() is false as
226 * we may have preferred a MSAA extension that doesn't rely on glBlitFramebu ffer.
227 */
228 BlitFramebufferSupport blitFramebufferSupport() const { return fBlitFramebuf ferSupport; }
229
230 /**
215 * Is the MSAA FBO extension one where the texture is multisampled when boun d to an FBO and 231 * Is the MSAA FBO extension one where the texture is multisampled when boun d to an FBO and
216 * then implicitly resolved when read. 232 * then implicitly resolved when read.
217 */ 233 */
218 bool usesImplicitMSAAResolve() const { 234 bool usesImplicitMSAAResolve() const {
219 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || 235 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType ||
220 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; 236 kES_EXT_MsToTexture_MSFBOType == fMSFBOType;
221 } 237 }
222 238
223 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } 239 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; }
224 240
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 bool fIsCoreProfile : 1; 412 bool fIsCoreProfile : 1;
397 bool fBindFragDataLocationSupport : 1; 413 bool fBindFragDataLocationSupport : 1;
398 bool fSRGBWriteControl : 1; 414 bool fSRGBWriteControl : 1;
399 bool fRGBA8888PixelsOpsAreSlow : 1; 415 bool fRGBA8888PixelsOpsAreSlow : 1;
400 bool fPartialFBOReadIsSlow : 1; 416 bool fPartialFBOReadIsSlow : 1;
401 bool fBindUniformLocationSupport : 1; 417 bool fBindUniformLocationSupport : 1;
402 bool fExternalTextureSupport : 1; 418 bool fExternalTextureSupport : 1;
403 bool fRectangleTextureSupport : 1; 419 bool fRectangleTextureSupport : 1;
404 bool fTextureSwizzleSupport : 1; 420 bool fTextureSwizzleSupport : 1;
405 421
422 BlitFramebufferSupport fBlitFramebufferSupport;
423
406 /** Number type of the components (with out considering number of bits.) */ 424 /** Number type of the components (with out considering number of bits.) */
407 enum FormatType { 425 enum FormatType {
408 kNormalizedFixedPoint_FormatType, 426 kNormalizedFixedPoint_FormatType,
409 kFloat_FormatType, 427 kFloat_FormatType,
410 }; 428 };
411 429
412 struct ReadPixelsFormat { 430 struct ReadPixelsFormat {
413 ReadPixelsFormat() : fFormat(0), fType(0) {} 431 ReadPixelsFormat() : fFormat(0), fType(0) {}
414 GrGLenum fFormat; 432 GrGLenum fFormat;
415 GrGLenum fType; 433 GrGLenum fType;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 488
471 GrSwizzle fSwizzle; 489 GrSwizzle fSwizzle;
472 }; 490 };
473 491
474 ConfigInfo fConfigTable[kGrPixelConfigCnt]; 492 ConfigInfo fConfigTable[kGrPixelConfigCnt];
475 493
476 typedef GrCaps INHERITED; 494 typedef GrCaps INHERITED;
477 }; 495 };
478 496
479 #endif 497 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLCaps.cpp » ('j') | src/gpu/gl/GrGLGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698