aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-01-29 09:34:17 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-30 16:39:41 +0000
commit3de0aee181b8fe0013b15100cba7381eb0468db4 (patch)
tree5e08bf4394a36d800d07555112d1e1eb9c2a652d /include
parent7f660e84189adc92b1996b4b2e0f5a1ad897dff9 (diff)
Make SkGpuDevice::drawVertices perform color byte order swap and premul step using vertex shader.
Change-Id: I8153ba8c6bb48d8b15d524fbfafbe3c6d83f39c5 Reviewed-on: https://skia-review.googlesource.com/7727 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrRenderTargetContext.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/gpu/GrRenderTargetContext.h b/include/gpu/GrRenderTargetContext.h
index 3056449233..040e896b71 100644
--- a/include/gpu/GrRenderTargetContext.h
+++ b/include/gpu/GrRenderTargetContext.h
@@ -195,6 +195,10 @@ public:
const SkPath&,
const GrStyle& style);
+ enum class ColorArrayType {
+ kPremulGrColor,
+ kSkColor,
+ };
/**
* Draws vertices with a paint.
*
@@ -211,6 +215,7 @@ public:
* are drawn non-indexed.
* @param indexCount if indices is non-null then this is the
* number of indices.
+ * @param ColorArrayType Determines how the color array should be interpreted.
*/
void drawVertices(const GrClip&,
GrPaint&& paint,
@@ -219,9 +224,10 @@ public:
int vertexCount,
const SkPoint positions[],
const SkPoint texs[],
- const GrColor colors[],
+ const uint32_t colors[],
const uint16_t indices[],
- int indexCount);
+ int indexCount,
+ ColorArrayType = ColorArrayType::kPremulGrColor);
/**
* Draws textured sprites from an atlas with a paint. This currently does not support AA for the