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

Unified Diff: src/gpu/gl/GrGLPathProgram.h

Issue 1186113007: Refactor separable varying location info to be stored in GrGLProgram subclass (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comments Created 5 years, 6 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/GrGLPathProcessor.cpp ('k') | src/gpu/gl/GrGLPathProgram.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLPathProgram.h
diff --git a/src/gpu/gl/GrGLPathProgram.h b/src/gpu/gl/GrGLPathProgram.h
new file mode 100644
index 0000000000000000000000000000000000000000..503940c015627fbe1a12800d6dca793def4e0518
--- /dev/null
+++ b/src/gpu/gl/GrGLPathProgram.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrGLPathProgram_DEFINED
+#define GrGLPathProgram_DEFINED
+
+#include "gl/GrGLProgram.h"
+#include "gl/GrGLPathProgramDataManager.h"
+
+/*
+ * The default GrGL programs consist of at the very least a vertex and fragment shader.
+ * 1.3+ Nvpr ignores the vertex shader, but both require
+ * specialized methods for setting transform data. NVPR also requires setting the
+ * projection matrix through a special function call.
+ */
+class GrGLPathProgram : public GrGLProgram {
+protected:
+ typedef GrGLPathProgramDataManager::SeparableVaryingInfoArray SeparableVaryingInfoArray;
+ GrGLPathProgram(GrGLGpu*,
+ const GrProgramDesc&,
+ const BuiltinUniformHandles&,
+ GrGLuint programID,
+ const UniformInfoArray&,
+ const SeparableVaryingInfoArray&,
+ GrGLInstalledGeoProc*,
+ GrGLInstalledXferProc* xferProcessor,
+ GrGLInstalledFragProcs* fragmentProcessors,
+ SkTArray<UniformHandle>* passSamplerUniforms);
+
+private:
+ void didSetData() override;
+ virtual void setTransformData(const GrPrimitiveProcessor&,
+ const GrPendingFragmentStage&,
+ int index,
+ GrGLInstalledFragProc*) override;
+ virtual void onSetRenderTargetState(const GrPrimitiveProcessor&, const GrPipeline&);
+
+ friend class GrGLPathProgramBuilder;
+
+ GrGLPathProgramDataManager fPathProgramDataManager;
+
+ typedef GrGLProgram INHERITED;
+};
+
+#endif
« no previous file with comments | « src/gpu/gl/GrGLPathProcessor.cpp ('k') | src/gpu/gl/GrGLPathProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698