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
diff --git a/gpu/include/GrTexture.h b/gpu/include/GrTexture.h
index 8f9952a..493bb8d 100644
--- a/gpu/include/GrTexture.h
+++ b/gpu/include/GrTexture.h
@@ -54,6 +54,11 @@
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 @@
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 @@
int fWidth;
int fHeight;
int fStencilBits;
+ bool fIsMultisampled;
private:
// GrGpu keeps a cached clip in the render target to avoid redundantly