From 1f221a70214fa1ab87b8a32dd66facf485f318ee Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Tue, 23 Aug 2011 20:54:07 +0000 Subject: More prep work in Gr for landing AA hairline renderer. Review URL: http://codereview.appspot.com/4944045 git-svn-id: http://skia.googlecode.com/svn/trunk@2164 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gpu/include/GrContext.h | 10 +++++++++- gpu/include/GrSamplerState.h | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'gpu/include') diff --git a/gpu/include/GrContext.h b/gpu/include/GrContext.h index e07cf42288..3fe1a7b367 100644 --- a/gpu/include/GrContext.h +++ b/gpu/include/GrContext.h @@ -182,7 +182,9 @@ public: /** * Returns true if the specified use of an indexed texture is supported. */ - bool supportsIndex8PixelConfig(const GrSamplerState&, int width, int height); + bool supportsIndex8PixelConfig(const GrSamplerState&, + int width, + int height) const; /** * Return the current texture cache limits. @@ -386,6 +388,11 @@ public: /////////////////////////////////////////////////////////////////////////// // Misc. + /** + * Currently needed by SkGpuDevice. Ideally this shouldn't be exposed. + */ + bool supportsShaders() const; + /** * Flags that affect flush() behavior. */ @@ -510,6 +517,7 @@ public: /////////////////////////////////////////////////////////////////////////// // Functions intended for internal use only. GrGpu* getGpu() { return fGpu; } + const GrGpu* getGpu() const { return fGpu; } GrFontCache* getFontCache() { return fFontCache; } GrDrawTarget* getTextTarget(const GrPaint& paint); void flushText(); diff --git a/gpu/include/GrSamplerState.h b/gpu/include/GrSamplerState.h index 624e09fe5a..324472c972 100644 --- a/gpu/include/GrSamplerState.h +++ b/gpu/include/GrSamplerState.h @@ -31,7 +31,8 @@ public: * Average of 4 bilinear filterings spaced +/- 1 texel from sample * position in x and y. Intended for averaging 16 texels in a downsample * pass. (rasterizing such that texture samples fall exactly halfway - * between texels in x and y spaced 4 texels apart.) + * between texels in x and y spaced 4 texels apart.) Only supported + * on shader backends. */ k4x4Downsample_Filter, /** -- cgit v1.2.3