aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextContext.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-30 18:41:38 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-30 18:41:38 +0000
commit76eaf749cfb903916488bfaf90c40470033ed216 (patch)
tree3bc192d66c6c7148134b64db27cbce6c7c57f277 /src/gpu/GrTextContext.cpp
parent1e10a9a207e6e6ccfbc7e9cdc93c472ae7c96712 (diff)
Add a GrCustomCoordsTextureEffect class
Extracts a GrCustomCoordsTextureEffect class from GrSimpleTextureEffect. This way there are no effects that can conditionally require a vertex shader. They either always need one or never do. Also removes kCustom_CoordsType from the CoordsType enum in GrEffect (that enum is really only meant for coords provided by the framework), and updates GrSimpleTextureEffect::TestCreate to make the effect with position as well, instead of just local coords. R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/24018007 git-svn-id: http://skia.googlecode.com/svn/trunk@11531 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrTextContext.cpp')
-rw-r--r--src/gpu/GrTextContext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index b050305908..1f25c906fb 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -17,6 +17,7 @@
#include "GrTextStrike_impl.h"
#include "SkPath.h"
#include "SkStrokeRec.h"
+#include "effects/GrCustomCoordsTextureEffect.h"
static const int kGlyphCoordsAttributeIndex = 1;
@@ -37,7 +38,7 @@ void GrTextContext::flushGlyphs() {
// This effect could be stored with one of the cache objects (atlas?)
drawState->addCoverageEffect(
- GrSimpleTextureEffect::CreateWithCustomCoords(fCurrTexture, params),
+ GrCustomCoordsTextureEffect::Create(fCurrTexture, params),
kGlyphCoordsAttributeIndex)->unref();
if (!GrPixelConfigIsAlphaOnly(fCurrTexture->config())) {