diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-01-30 18:09:31 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-01-30 18:09:31 +0000 |
commit | 78d6cf9f434d3351b19de14f1eab424c23f0ab6d (patch) | |
tree | bd8e9870518da531a8d2e3ad7f4fcca20ecb1413 /include/gpu | |
parent | fa4d5bd09f8f1a4a92b5ae0324800dd672760898 (diff) |
Remove GrAALevel enum, use explicit sample count
Review URL: http://codereview.appspot.com/5600045/
git-svn-id: http://skia.googlecode.com/svn/trunk@3106 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrTypes.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h index 7382a2d75a..9f245d944a 100644 --- a/include/gpu/GrTypes.h +++ b/include/gpu/GrTypes.h @@ -429,18 +429,10 @@ static inline bool GrPixelConfigIsAlphaOnly(GrPixelConfig config) { } /** - * Used to control the level of antialiasing available for a rendertarget. - * Anti-alias quality levels depend on the underlying API/GPU capabilities. - */ -enum GrAALevels { - kNone_GrAALevel, //<! No antialiasing available. - kLow_GrAALevel, //<! Low quality antialiased rendering. Actual - // interpretation is platform-dependent. - kMed_GrAALevel, //<! Medium quality antialiased rendering. Actual - // interpretation is platform-dependent. - kHigh_GrAALevel, //<! High quality antialiased rendering. Actual - // interpretation is platform-dependent. -}; + * DEPRECATED: This will be removed as soon as WebKit no longer references + * this (former) enum value. + */ +static const int kNone_GrAALevel = 0; /** * Optional bitfield flags that can be passed to createTexture. @@ -479,18 +471,31 @@ enum { */ struct GrTextureDesc { GrTextureFlags fFlags; //!< bitfield of TextureFlags - /** - * The level of antialiasing available for a rendertarget texture. Only used - * fFlags contains kRenderTarget_GrTextureFlag. - */ - GrAALevels fAALevel; int fWidth; //!< Width of the texture int fHeight; //!< Height of the texture + /** * Format of source data of the texture. Not guaraunteed to be the same as * internal format used by 3D API. */ GrPixelConfig fConfig; + + /** + * The number of samples per pixel or 0 to disable full scene AA. This only + * applies if the kRenderTarget_GrTextureFlagBit is set. The actual number + * of samples may not exactly match the request. The request will be rounded + * up to the next supported sample count, or down if it is larger than the + * max supportex count. + */ + union { + /** + * This field has two names for legacy reasons. Use the fSampleCnt name. + * fAALevel is deprecated and will be removed as soon as WebKit no + * longer uses it. + */ + int fSampleCnt; + int fAALevel; + }; }; /** |