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

Unified Diff: src/gpu/gl/builders/GrGLFragmentShaderBuilder.h

Issue 1286293002: Added class AutoFragmentChildProcAdvance to be constructed before a child emitCode and destructed a… (Closed) Base URL: https://skia.googlesource.com/skia@cs3_onBeforeAfter
Patch Set: fixed Josh's nits; added comments explaining backwards linear search for child coords/samplers Created 5 years, 4 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/gl/builders/GrGLFragmentShaderBuilder.h
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h
index 8746fffb8b101f75cb3d637045b2fa736bfd6bfd..3fb029989713adb7e000848413b0c0dd0f43a4df 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h
@@ -77,6 +77,27 @@ public:
return ret;
}
+ // This class is like AutoStageAdvance but used for the child procs of a fragment proc.
tomhudson 2015/08/14 15:58:48 This comment requires the reader to understand Aut
wangyix 2015/08/14 16:07:27 Acknowledged.
+ class AutoFragmentChildProcAdvance {
+ typedef GrGLProcessor::TransformedCoordsArray TransformedCoordsArray;
+ typedef GrGLProcessor::TextureSamplerArray TextureSamplerArray;
+ public:
+ AutoFragmentChildProcAdvance(int childProcIndex,
+ GrGLFPBuilder* builder,
+ const GrFragmentProcessor& fp,
+ const char* outputColor,
+ const TransformedCoordsArray& coords,
+ const TextureSamplerArray& samplers,
+ const GrFragmentProcessor** childFp,
+ SkString* childOutputColor,
+ TransformedCoordsArray* childCoords,
+ TextureSamplerArray* childSamplers);
+
+ ~AutoFragmentChildProcAdvance();
+ private:
+ GrGLFragmentBuilder* fFsb;
+ };
+
private:
/*
* State that tracks which child proc in the proc tree is currently emitting code. This is

Powered by Google App Engine
This is Rietveld 408576698