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

Unified Diff: src/gpu/gl/GrGLEffect.cpp

Issue 25605008: Repurpose GrGLCoordTransform as GrGLEffectArray (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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
« no previous file with comments | « src/gpu/gl/GrGLEffect.h ('k') | src/gpu/gl/GrGLProgram.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLEffect.cpp
diff --git a/src/gpu/gl/GrGLEffect.cpp b/src/gpu/gl/GrGLEffect.cpp
deleted file mode 100644
index af351a47fe41f435ab5c9b57483dd5ad5ecaee6e..0000000000000000000000000000000000000000
--- a/src/gpu/gl/GrGLEffect.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "GrGLSL.h"
-#include "GrGLEffect.h"
-#include "GrCoordTransform.h"
-#include "GrDrawEffect.h"
-
-GrGLEffect::GrGLEffect(const GrBackendEffectFactory& factory)
- : fFactory(factory) {
-}
-
-GrGLEffect::~GrGLEffect() {
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-void GrGLEffect::setData(const GrGLUniformManager&, const GrDrawEffect&) {
-}
-
-GrGLEffect::EffectKey GrGLEffect::GenTextureKey(const GrDrawEffect& drawEffect,
- const GrGLCaps& caps) {
- EffectKey key = 0;
- int numTextures = (*drawEffect.effect())->numTextures();
- for (int index = 0; index < numTextures; ++index) {
- const GrTextureAccess& access = (*drawEffect.effect())->textureAccess(index);
- EffectKey value = GrGLShaderBuilder::KeyForTextureAccess(access, caps) << index;
- SkASSERT(0 == (value & key)); // keys for each access ought not to overlap
- key |= value;
- }
- return key;
-}
-
-GrGLEffect::EffectKey GrGLEffect::GenTransformKey(const GrDrawEffect& drawEffect) {
- EffectKey key = 0;
- int numTransforms = (*drawEffect.effect())->numTransforms();
- for (int index = 0; index < numTransforms; ++index) {
- EffectKey value = GrGLCoordTransform::GenKey(drawEffect, index);
- value <<= index * GrGLCoordTransform::kKeyBits;
- SkASSERT(0 == (value & key)); // keys for each transform ought not to overlap
- key |= value;
- }
- return key;
-}
-
-GrGLEffect::EffectKey GrGLEffect::GenAttribKey(const GrDrawEffect& drawEffect) {
- EffectKey key = 0;
-
- int numAttributes = drawEffect.getVertexAttribIndexCount();
- SkASSERT(numAttributes <= 2);
- const int* attributeIndices = drawEffect.getVertexAttribIndices();
- for (int index = 0; index < numAttributes; ++index) {
- EffectKey value = attributeIndices[index] << 3*index;
- SkASSERT(0 == (value & key)); // keys for each attribute ought not to overlap
- key |= value;
- }
-
- return key;
-}
« no previous file with comments | « src/gpu/gl/GrGLEffect.h ('k') | src/gpu/gl/GrGLProgram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698