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

Side by Side Diff: src/gpu/GrOvalRenderer.cpp

Issue 23537028: Enable vertexless shading when path rendering is supported (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/gpu/gl/GrGLEffectMatrix.h » ('j') | src/gpu/gl/GrGLShaderBuilder.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrOvalRenderer.h" 8 #include "GrOvalRenderer.h"
9 9
10 #include "GrEffect.h" 10 #include "GrEffect.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 static const char* Name() { return "DIEllipseEdge"; } 346 static const char* Name() { return "DIEllipseEdge"; }
347 347
348 inline Mode getMode() const { return fMode; } 348 inline Mode getMode() const { return fMode; }
349 349
350 class GLEffect : public GrGLEffect { 350 class GLEffect : public GrGLEffect {
351 public: 351 public:
352 GLEffect(const GrBackendEffectFactory& factory, const GrDrawEffect&) 352 GLEffect(const GrBackendEffectFactory& factory, const GrDrawEffect&)
353 : INHERITED (factory) {} 353 : INHERITED (factory) {}
354 354
355 virtual bool requiresVertexShader(const GrDrawEffect&) const SK_OVERRIDE { return true; }
356
355 virtual void emitCode(GrGLShaderBuilder* builder, 357 virtual void emitCode(GrGLShaderBuilder* builder,
356 const GrDrawEffect& drawEffect, 358 const GrDrawEffect& drawEffect,
357 EffectKey key, 359 EffectKey key,
358 const char* outputColor, 360 const char* outputColor,
359 const char* inputColor, 361 const char* inputColor,
360 const TextureSamplerArray& samplers) SK_OVERRIDE { 362 const TextureSamplerArray& samplers) SK_OVERRIDE {
361 GrGLShaderBuilder::VertexBuilder* vertexBuilder = builder->getVertex Builder(); 363 GrGLShaderBuilder::VertexBuilder* vertexBuilder = builder->getVertex Builder();
362 SkASSERT(NULL != vertexBuilder); 364 SkASSERT(NULL != vertexBuilder);
363 365
364 const DIEllipseEdgeEffect& ellipseEffect = drawEffect.castEffect<DIE llipseEdgeEffect>(); 366 const DIEllipseEdgeEffect& ellipseEffect = drawEffect.castEffect<DIE llipseEdgeEffect>();
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 } 1143 }
1142 1144
1143 // drop out the middle quad if we're stroked 1145 // drop out the middle quad if we're stroked
1144 int indexCnt = isStroked ? GR_ARRAY_COUNT(gRRectIndices)-6 : GR_ARRAY_CO UNT(gRRectIndices); 1146 int indexCnt = isStroked ? GR_ARRAY_COUNT(gRRectIndices)-6 : GR_ARRAY_CO UNT(gRRectIndices);
1145 target->setIndexSourceToBuffer(indexBuffer); 1147 target->setIndexSourceToBuffer(indexBuffer);
1146 target->drawIndexed(kTriangles_GrPrimitiveType, 0, 0, 16, indexCnt, &bou nds); 1148 target->drawIndexed(kTriangles_GrPrimitiveType, 0, 0, 16, indexCnt, &bou nds);
1147 } 1149 }
1148 1150
1149 return true; 1151 return true;
1150 } 1152 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLEffectMatrix.h » ('j') | src/gpu/gl/GrGLShaderBuilder.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698