Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: src/gpu/draws/GrDrawRect.h

Issue 1336413006: Just an experiment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/draws/GrDraw.cpp ('k') | src/gpu/draws/GrDrawRect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/gpu/draws/GrDraw.cpp ('k') | src/gpu/draws/GrDrawRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698