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

Unified Diff: src/gpu/GrPaintStyle.h

Issue 311183002: Push dash checks into GrContext. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix merge issue with bounder Created 6 years, 6 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
Index: src/gpu/GrPaintStyle.h
diff --git a/src/gpu/GrPaintStyle.h b/src/gpu/GrPaintStyle.h
new file mode 100644
index 0000000000000000000000000000000000000000..26595d0d8c880b83f43a6073d2be3b02359850be
--- /dev/null
+++ b/src/gpu/GrPaintStyle.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrPaintStyle_DEFINED
+#define GrPaintStyle_DEFINED
+
+#include "SkStrokeRec.h"
+#include "SkPathEffect.h"
+
+class GrPaintStyle {
bsalomon 2014/06/04 19:05:05 I dunno about PaintStyle... it's more about stylin
robertphillips 2014/06/04 19:33:01 I also find PaintStyle less then intuitive: GrGeo
egdaniel 2014/06/04 19:34:30 It should be changed but I think Path is too speci
egdaniel 2014/06/05 17:18:15 Changed to GrStrokeInfo
+public:
+ GrPaintStyle() : fStroke(NULL), fDashInfo(NULL) {}
+
+ void setStrokeRec(SkStrokeRec* stroke) {
+ fStroke = stroke;
+ }
+
+ bool hasStrokeRec() const { return NULL != fStroke; }
+
+ SkStrokeRec* getStrokeRec() const { return fStroke; }
+
+ void setDashInfo(SkPathEffect::DashInfo* dashInfo) {
+ fDashInfo = dashInfo;
+ }
+
+ bool hasDashInfo() const { return NULL != fDashInfo; }
+
+ const SkPathEffect::DashInfo* getDashInfo() const { return fDashInfo; }
+
+private:
+ SkStrokeRec* fStroke;
bsalomon 2014/06/04 19:05:05 Can we do this in a safer way (not raw ptrs) witho
egdaniel 2014/06/05 17:18:15 The SkStrokeRec and DashInfo are now stored inside
+ SkPathEffect::DashInfo* fDashInfo;
+};
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698