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

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

Issue 1355353002: Create GrDraw and start fast pathing src over rects (Closed) Base URL: https://skia.googlesource.com/skia.git@strokerect2
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..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
« 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