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

Unified Diff: src/gpu/gl/builders/GrGLPathProgramBuilder.cpp

Issue 1336763003: remove path specific program building classes (Closed) Base URL: https://skia.googlesource.com/skia.git@pathgp
Patch Set: a few more tidys Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/builders/GrGLPathProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLPathProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLPathProgramBuilder.cpp b/src/gpu/gl/builders/GrGLPathProgramBuilder.cpp
deleted file mode 100644
index dd6a2763e9062f31838a095d2068ab5900ffd400..0000000000000000000000000000000000000000
--- a/src/gpu/gl/builders/GrGLPathProgramBuilder.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "GrGLPathProgramBuilder.h"
-#include "gl/GrGLGpu.h"
-#include "gl/GrGLPathProgram.h"
-
-#define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X)
-#define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->gpu()->glInterface(), R, X)
-
-GrGLPathProgramBuilder::GrGLPathProgramBuilder(GrGLGpu* gpu, const DrawArgs& args)
- : INHERITED(gpu, args)
- , fSeparableVaryingInfos(kVarsPerBlock) {
-}
-
-GrGLProgram* GrGLPathProgramBuilder::createProgram(GrGLuint programID) {
- return new GrGLPathProgram(fGpu, this->desc(), fUniformHandles, programID, fUniforms,
- fSeparableVaryingInfos, fGeometryProcessor, fXferProcessor,
- fFragmentProcessors.get(), &fSamplerUniforms);
-}
-
-GrGLProgramBuilder::SeparableVaryingHandle GrGLPathProgramBuilder::addSeparableVarying(
- const char* name, GrGLVertToFrag* v, GrSLPrecision fsPrecision) {
- this->addVarying(name, v, fsPrecision);
- SeparableVaryingInfo& varyingInfo = fSeparableVaryingInfos.push_back();
- varyingInfo.fVariable = this->getFragmentShaderBuilder()->fInputs.back();
- varyingInfo.fLocation = fSeparableVaryingInfos.count() - 1;
- return SeparableVaryingHandle(varyingInfo.fLocation);
-}
-
-void GrGLPathProgramBuilder::bindProgramResourceLocations(GrGLuint programID) {
- this->INHERITED::bindProgramResourceLocations(programID);
- if (!fGpu->glPathRendering()->shouldBindFragmentInputs()) {
- return;
- }
- int count = fSeparableVaryingInfos.count();
- for (int i = 0; i < count; ++i) {
- GL_CALL(BindFragmentInputLocation(programID,
- i,
- fSeparableVaryingInfos[i].fVariable.c_str()));
- fSeparableVaryingInfos[i].fLocation = i;
- }
-}
-
-void GrGLPathProgramBuilder::resolveProgramResourceLocations(GrGLuint programID) {
- this->INHERITED::resolveProgramResourceLocations(programID);
- if (fGpu->glPathRendering()->shouldBindFragmentInputs()) {
- return;
- }
- int count = fSeparableVaryingInfos.count();
- for (int i = 0; i < count; ++i) {
- GrGLint location;
- GL_CALL_RET(location,
- GetProgramResourceLocation(programID,
- GR_GL_FRAGMENT_INPUT,
- fSeparableVaryingInfos[i].fVariable.c_str()));
- fSeparableVaryingInfos[i].fLocation = location;
- }
-}
« no previous file with comments | « src/gpu/gl/builders/GrGLPathProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698