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

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

Issue 243413002: Add support for glMapBufferRange. Use glMapBufferRange and glMapBufferSubData. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase to tot Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLBufferImpl.cpp ('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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 }; 79 };
80 80
81 enum InvalidateFBType { 81 enum InvalidateFBType {
82 kNone_InvalidateFBType, 82 kNone_InvalidateFBType,
83 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer() 83 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer()
84 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer() 84 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer()
85 85
86 kLast_InvalidateFBType = kInvalidate_InvalidateFBType 86 kLast_InvalidateFBType = kInvalidate_InvalidateFBType
87 }; 87 };
88 88
89 enum MapBufferType {
90 kNone_MapBufferType,
91 kMapBuffer_MapBufferType, // glMapBuffer()
92 kMapBufferRange_MapBufferType, // glMapBufferRange()
93 kChromium_MapBufferType, // GL_CHROMIUM_map_sub
94
95 kLast_MapBufferType = kChromium_MapBufferType,
96 };
97
89 /** 98 /**
90 * Creates a GrGLCaps that advertises no support for any extensions, 99 * Creates a GrGLCaps that advertises no support for any extensions,
91 * formats, etc. Call init to initialize from a GrGLContextInfo. 100 * formats, etc. Call init to initialize from a GrGLContextInfo.
92 */ 101 */
93 GrGLCaps(); 102 GrGLCaps();
94 103
95 GrGLCaps(const GrGLCaps& caps); 104 GrGLCaps(const GrGLCaps& caps);
96 105
97 GrGLCaps& operator = (const GrGLCaps& caps); 106 GrGLCaps& operator = (const GrGLCaps& caps);
98 107
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 */ 171 */
163 bool usesImplicitMSAAResolve() const { 172 bool usesImplicitMSAAResolve() const {
164 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || 173 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType ||
165 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; 174 kES_EXT_MsToTexture_MSFBOType == fMSFBOType;
166 } 175 }
167 176
168 FBFetchType fbFetchType() const { return fFBFetchType; } 177 FBFetchType fbFetchType() const { return fFBFetchType; }
169 178
170 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } 179 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; }
171 180
172 /** 181 /// What type of buffer mapping is supported?
173 * Returs a string containeng the caps info. 182 MapBufferType mapBufferType() const { return fMapBufferType; }
174 */
175 virtual SkString dump() const SK_OVERRIDE;
176 183
177 /** 184 /**
178 * Gets an array of legal stencil formats. These formats are not guaranteed 185 * Gets an array of legal stencil formats. These formats are not guaranteed
179 * to be supported by the driver but are legal GLenum names given the GL 186 * to be supported by the driver but are legal GLenum names given the GL
180 * version and extensions supported. 187 * version and extensions supported.
181 */ 188 */
182 const SkTArray<StencilFormat, true>& stencilFormats() const { 189 const SkTArray<StencilFormat, true>& stencilFormats() const {
183 return fStencilFormats; 190 return fStencilFormats;
184 } 191 }
185 192
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 GrGLenum format, 258 GrGLenum format,
252 GrGLenum type) const; 259 GrGLenum type) const;
253 260
254 bool isCoreProfile() const { return fIsCoreProfile; } 261 bool isCoreProfile() const { return fIsCoreProfile; }
255 262
256 263
257 bool fullClearIsFree() const { return fFullClearIsFree; } 264 bool fullClearIsFree() const { return fFullClearIsFree; }
258 265
259 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; } 266 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; }
260 267
261 /// Is GL_CHROMIUM_map_sub supported? 268 /**
262 bool mapSubSupport() const { return fMapSubSupport; } 269 * Returns a string containing the caps info.
270 */
271 virtual SkString dump() const SK_OVERRIDE;
263 272
264 private: 273 private:
265 /** 274 /**
266 * Maintains a bit per GrPixelConfig. It is used to avoid redundantly 275 * Maintains a bit per GrPixelConfig. It is used to avoid redundantly
267 * performing glCheckFrameBufferStatus for the same config. 276 * performing glCheckFrameBufferStatus for the same config.
268 */ 277 */
269 struct VerifiedColorConfigs { 278 struct VerifiedColorConfigs {
270 VerifiedColorConfigs() { 279 VerifiedColorConfigs() {
271 this->reset(); 280 this->reset();
272 } 281 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs; 324 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs;
316 325
317 int fMaxFragmentUniformVectors; 326 int fMaxFragmentUniformVectors;
318 int fMaxVertexAttributes; 327 int fMaxVertexAttributes;
319 int fMaxFragmentTextureUnits; 328 int fMaxFragmentTextureUnits;
320 int fMaxFixedFunctionTextureCoords; 329 int fMaxFixedFunctionTextureCoords;
321 330
322 MSFBOType fMSFBOType; 331 MSFBOType fMSFBOType;
323 FBFetchType fFBFetchType; 332 FBFetchType fFBFetchType;
324 InvalidateFBType fInvalidateFBType; 333 InvalidateFBType fInvalidateFBType;
334 MapBufferType fMapBufferType;
325 335
326 bool fRGBA8RenderbufferSupport : 1; 336 bool fRGBA8RenderbufferSupport : 1;
327 bool fBGRAFormatSupport : 1; 337 bool fBGRAFormatSupport : 1;
328 bool fBGRAIsInternalFormat : 1; 338 bool fBGRAIsInternalFormat : 1;
329 bool fTextureSwizzleSupport : 1; 339 bool fTextureSwizzleSupport : 1;
330 bool fUnpackRowLengthSupport : 1; 340 bool fUnpackRowLengthSupport : 1;
331 bool fUnpackFlipYSupport : 1; 341 bool fUnpackFlipYSupport : 1;
332 bool fPackRowLengthSupport : 1; 342 bool fPackRowLengthSupport : 1;
333 bool fPackFlipYSupport : 1; 343 bool fPackFlipYSupport : 1;
334 bool fTextureUsageSupport : 1; 344 bool fTextureUsageSupport : 1;
335 bool fTexStorageSupport : 1; 345 bool fTexStorageSupport : 1;
336 bool fTextureRedSupport : 1; 346 bool fTextureRedSupport : 1;
337 bool fImagingSupport : 1; 347 bool fImagingSupport : 1;
338 bool fTwoFormatLimit : 1; 348 bool fTwoFormatLimit : 1;
339 bool fFragCoordsConventionSupport : 1; 349 bool fFragCoordsConventionSupport : 1;
340 bool fVertexArrayObjectSupport : 1; 350 bool fVertexArrayObjectSupport : 1;
341 bool fUseNonVBOVertexAndIndexDynamicData : 1; 351 bool fUseNonVBOVertexAndIndexDynamicData : 1;
342 bool fIsCoreProfile : 1; 352 bool fIsCoreProfile : 1;
343 bool fFullClearIsFree : 1; 353 bool fFullClearIsFree : 1;
344 bool fDropsTileOnZeroDivide : 1; 354 bool fDropsTileOnZeroDivide : 1;
345 bool fMapSubSupport : 1;
346 355
347 typedef GrDrawTargetCaps INHERITED; 356 typedef GrDrawTargetCaps INHERITED;
348 }; 357 };
349 358
350 #endif 359 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLBufferImpl.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698