Make GrPaint have a variable sized array of color and coverage stages rather than a fixed size.
R=robertphillips@google.com, jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/18686007
git-svn-id: http://skia.googlecode.com/svn/trunk@10062 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrPaint.cpp b/src/gpu/GrPaint.cpp
new file mode 100644
index 0000000..b05c3c3
--- /dev/null
+++ b/src/gpu/GrPaint.cpp
@@ -0,0 +1,36 @@
+
+/*
+ * Copyright 2013 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "GrPaint.h"
+
+#include "effects/GrSimpleTextureEffect.h"
+
+void GrPaint::addColorTextureEffect(GrTexture* texture, const SkMatrix& matrix) {
+ GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix);
+ this->addColorEffect(effect)->unref();
+}
+
+void GrPaint::addCoverageTextureEffect(GrTexture* texture, const SkMatrix& matrix) {
+ GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix);
+ this->addCoverageEffect(effect)->unref();
+}
+
+void GrPaint::addColorTextureEffect(GrTexture* texture,
+ const SkMatrix& matrix,
+ const GrTextureParams& params) {
+ GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix, params);
+ this->addColorEffect(effect)->unref();
+}
+
+void GrPaint::addCoverageTextureEffect(GrTexture* texture,
+ const SkMatrix& matrix,
+ const GrTextureParams& params) {
+ GrEffectRef* effect = GrSimpleTextureEffect::Create(texture, matrix, params);
+ this->addCoverageEffect(effect)->unref();
+}
+