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

Unified Diff: src/gpu/glsl/GrGLSLProgramBuilder.h

Issue 1717393002: Add "sample locations" feature to GrProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_getmultisamp
Patch Set: move into GrProcessor Created 4 years, 10 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
Index: src/gpu/glsl/GrGLSLProgramBuilder.h
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h
index b8669bf2f6e70699b84937c3ad73d6ff7fe48253..a16c050e455147c1a1dc69de227621a7f96868ae 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.h
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.h
@@ -10,6 +10,7 @@
#include "GrGeometryProcessor.h"
#include "GrGpu.h"
+#include "GrPipeline.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLGeometryShaderBuilder.h"
#include "glsl/GrGLSLPrimitiveProcessor.h"
@@ -39,6 +40,11 @@ public:
const GrPipeline& pipeline() const { return *fArgs.fPipeline; }
const GrProgramDesc& desc() const { return *fArgs.fDesc; }
const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header(); }
+ bool canReadFragmentPosition() const { return this->header().fFragPosKey; }
+ bool canUseSampleLocations() const {
+ SkASSERT(!this->header().fSamplePatternKey || this->pipeline().isHWAntialiasState());
+ return this->header().fSamplePatternKey;
+ }
void appendUniformDecls(GrShaderFlags visibility, SkString*) const;

Powered by Google App Engine
This is Rietveld 408576698