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

Unified Diff: src/gpu/glsl/GrGLSLProgramDesc.cpp

Issue 2184413002: Merge ProgramDesc's for GL and Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@minorPerf
Patch Set: typo Created 4 years, 5 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/glsl/GrGLSLProgramDesc.h ('k') | src/gpu/vk/GrVkPipeline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLProgramDesc.cpp
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/glsl/GrGLSLProgramDesc.cpp
similarity index 93%
rename from src/gpu/gl/GrGLProgramDesc.cpp
rename to src/gpu/glsl/GrGLSLProgramDesc.cpp
index 695a46d24003b0c487b340bb210f0b3b8e7b83dd..c44759a5ef29613c7689d7987aa63d7b3b86d61d 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/glsl/GrGLSLProgramDesc.cpp
@@ -1,18 +1,15 @@
/*
- * Copyright 2013 Google Inc.
+ * Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "GrGLProgramDesc.h"
+#include "GrGLSLProgramDesc.h"
#include "GrProcessor.h"
#include "GrPipeline.h"
#include "GrRenderTargetPriv.h"
#include "SkChecksum.h"
-#include "gl/GrGLDefines.h"
-#include "gl/GrGLTexture.h"
-#include "gl/GrGLTypes.h"
#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLCaps.h"
@@ -78,7 +75,7 @@ static bool gen_meta_key(const GrProcessor& proc,
uint32_t classID = proc.classID();
// Currently we allow 16 bits for the class id and the overall processor key size.
- static const uint32_t kMetaKeyInvalidMask = ~((uint32_t) SK_MaxU16);
+ static const uint32_t kMetaKeyInvalidMask = ~((uint32_t)SK_MaxU16);
if ((processorKeySize | classID) & kMetaKeyInvalidMask) {
return false;
}
@@ -107,16 +104,16 @@ static bool gen_frag_proc_and_meta_keys(const GrPrimitiveProcessor& primProc,
fp.numTransformsExclChildren()), b);
}
-bool GrGLProgramDescBuilder::Build(GrProgramDesc* desc,
- const GrPrimitiveProcessor& primProc,
- const GrPipeline& pipeline,
- const GrGLSLCaps& glslCaps) {
+bool GrGLSLProgramDescBuilder::Build(GrProgramDesc* desc,
+ const GrPrimitiveProcessor& primProc,
+ const GrPipeline& pipeline,
+ const GrGLSLCaps& glslCaps) {
// The descriptor is used as a cache key. Thus when a field of the
// descriptor will not affect program generation (because of the attribute
// bindings in use or other descriptor field settings) it should be set
// to a canonical value to avoid duplicate programs with different keys.
- GrGLProgramDesc* glDesc = (GrGLProgramDesc*) desc;
+ GrGLSLProgramDesc* glDesc = (GrGLSLProgramDesc*)desc;
GR_STATIC_ASSERT(0 == kProcessorKeysOffset % sizeof(uint32_t));
// Make room for everything up to the effect keys.
« no previous file with comments | « src/gpu/glsl/GrGLSLProgramDesc.h ('k') | src/gpu/vk/GrVkPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698