Correctly determine whether HW AA lines can be used
Review URL: http://codereview.appspot.com/4937049/



git-svn-id: http://skia.googlecode.com/svn/trunk@2162 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrInOrderDrawBuffer.h b/gpu/src/GrInOrderDrawBuffer.h
index 2a3bddb..dbf6144 100644
--- a/gpu/src/GrInOrderDrawBuffer.h
+++ b/gpu/src/GrInOrderDrawBuffer.h
@@ -16,8 +16,9 @@
 #include "GrAllocator.h"
 #include "GrClip.h"
 
-class GrVertexBufferAllocPool;
+class GrGpu;
 class GrIndexBufferAllocPool;
+class GrVertexBufferAllocPool;
 
 /**
  * GrInOrderDrawBuffer is an implementation of GrDrawTarget that queues up
@@ -37,12 +38,16 @@
     /**
      * Creates a GrInOrderDrawBuffer
      *
+     * @param gpu        the gpu object where this will be played back
+     *                   (possible indirectly). GrResources used with the draw
+     *                   buffer are created by this gpu object.
      * @param vertexPool pool where vertices for queued draws will be saved when
      *                   the vertex source is either reserved or array.
      * @param indexPool  pool where indices for queued draws will be saved when
      *                   the index source is either reserved or array.
      */
-    GrInOrderDrawBuffer(GrVertexBufferAllocPool* vertexPool,
+    GrInOrderDrawBuffer(const GrGpu* gpu,
+                        GrVertexBufferAllocPool* vertexPool,
                         GrIndexBufferAllocPool* indexPool);
 
     virtual ~GrInOrderDrawBuffer();
@@ -86,6 +91,8 @@
 
     virtual void clear(const GrIRect* rect, GrColor color);
 
+    virtual bool willUseHWAALines() const;
+
 private:
 
     struct Draw {
@@ -138,6 +145,7 @@
     void pushState();
     void pushClip();
 
+    const GrGpu*                    fGpu;
     GrTAllocator<Draw>              fDraws;
     GrTAllocator<SavedDrawState>    fStates;
     GrTAllocator<Clear>             fClears;