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..41fbf90bd1b9e26a9e426fdefd45d0af40a81ea1 |
--- /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 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); |
+ fClassID = GrDraw::ClassID<GrDrawRect>(); |
+ } |
+ |
+ void execute(GrDrawTarget*) const override; |
+ |
+ 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 |