aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/include/GrTexture.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-06 17:50:02 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-06 17:50:02 +0000
commitf954d8dd9a4e75aa97e7da79692f5a7add039e68 (patch)
treea4d0cbc377940968a589c018cbb6616aaa105e72 /gpu/include/GrTexture.h
parent7cf3dcd90275dcd23fa0d9230e144ee71852ef3a (diff)
Add isMultisampled() to GrRenderTarget. Cleanup MSAA vs smooth lines logic in GrGpuGL.
Skia issue: 178 Review URL: http://codereview.appspot.com/4382041/ git-svn-id: http://skia.googlecode.com/svn/trunk@1067 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/include/GrTexture.h')
-rw-r--r--gpu/include/GrTexture.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/gpu/include/GrTexture.h b/gpu/include/GrTexture.h
index 8f9952a851..493bb8d672 100644
--- a/gpu/include/GrTexture.h
+++ b/gpu/include/GrTexture.h
@@ -54,6 +54,11 @@ public:
GrTexture* asTexture() {return fTexture;}
/**
+ * @return true if the render target is multisampled, false otherwise
+ */
+ bool isMultisampled() { return fIsMultisampled; }
+
+ /**
* Reads a rectangle of pixels from the render target.
* @param left left edge of the rectangle to read (inclusive)
* @param top top edge of the rectangle to read (inclusive)
@@ -73,12 +78,14 @@ protected:
GrTexture* texture,
int width,
int height,
- int stencilBits)
+ int stencilBits,
+ bool isMultisampled)
: INHERITED(gpu)
, fTexture(texture)
, fWidth(width)
, fHeight(height)
, fStencilBits(stencilBits)
+ , fIsMultisampled(isMultisampled)
{}
friend class GrTexture;
@@ -96,6 +103,7 @@ protected:
int fWidth;
int fHeight;
int fStencilBits;
+ bool fIsMultisampled;
private:
// GrGpu keeps a cached clip in the render target to avoid redundantly