Index: src/gpu/draws/GrDrawRect.h |
diff --git a/src/gpu/draws/GrDrawRect.h b/src/gpu/draws/GrDrawRect.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a692ea03a68bc538191409761a5fc53783ed55a2 |
--- /dev/null |
+++ b/src/gpu/draws/GrDrawRect.h |
@@ -0,0 +1,58 @@ |
+/* |
+ * Copyright 2015 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#ifndef GrDrawRect_DEFINED |
+#define GrDrawRect_DEFINED |
+ |
+#include "GrDraw.h" |
+ |
+class GrClip; |
+class GrContext; |
+class GrDrawContext; |
+class GrRenderTarget; |
+class GrStrokeInfo; |
+class SkMatrix; |
+class SkPaint; |
+struct SkRect; |
+ |
+class GrDrawRect : public GrDraw { |
+public: |
+ GrDrawRect(GrRenderTarget* rt, |
+ GrContext* context, |
+ const GrClip& clip, |
+ const SkPaint& paint, |
+ const SkMatrix& viewMatrix, |
+ const SkRect& rect, |
+ const GrStrokeInfo* strokeInfo) |
+ : fRenderTarget(rt) |
+ , fContext(context) |
+ , fClip(&clip) |
+ , fPaint(&paint) |
+ , fViewMatrix(&viewMatrix) |
+ , fRect(&rect) |
+ , fStrokeInfo(strokeInfo) { |
+ GRDRAW_ASSERT_OWNED_RESOURCE(fRenderTarget); |
+ } |
+ |
+ void execute(GrDrawContext*) const; |
+ |
+ static uint32_t ClassID() { return GrDraw::ClassID<GrDrawRect>(); } |
+ |
+private: |
+ GrRenderTarget* fRenderTarget; |
+ GrContext* fContext; |
+ const GrClip* fClip; |
+ const SkPaint* fPaint; |
+ const SkMatrix* fViewMatrix; |
+ const SkRect* fRect; |
+ const GrStrokeInfo* fStrokeInfo; |
+ |
+ typedef GrDraw INHERITED; |
+}; |
+ |
+ |
+#endif |