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

Unified Diff: cc/output/shader.cc

Issue 2612823003: The great shader refactor: Delete all of the subclasses (Closed)
Patch Set: The great shader refactor: Delete all of the subclasses Created 3 years, 11 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 | « cc/output/shader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/shader.cc
diff --git a/cc/output/shader.cc b/cc/output/shader.cc
index 6d6edb4bd3816730ce45f5d2637b111208760a7c..6fa09001859e40664a7a956789a7691842b73f3c 100644
--- a/cc/output/shader.cc
+++ b/cc/output/shader.cc
@@ -395,14 +395,14 @@ std::string VertexShaderBase::GetShaderString() const {
FragmentShaderBase::FragmentShaderBase() {}
-std::string FragmentShaderBase::GetShaderString(TexCoordPrecision precision,
- SamplerType sampler) const {
+std::string FragmentShaderBase::GetShaderString() const {
// The AA shader values will use TexCoordPrecision.
+ TexCoordPrecision precision = tex_coord_precision_;
if (has_aa_ && precision == TEX_COORD_PRECISION_NA)
precision = TEX_COORD_PRECISION_MEDIUM;
return SetFragmentTexCoordPrecision(
precision, SetFragmentSamplerType(
- sampler, SetBlendModeFunctions(GetShaderSource())));
+ sampler_type_, SetBlendModeFunctions(GetShaderSource())));
}
void FragmentShaderBase::Init(GLES2Interface* context,
@@ -481,7 +481,7 @@ void FragmentShaderBase::FillLocations(ShaderLocations* locations) const {
locations->backdrop = backdrop_location_;
locations->backdrop_rect = backdrop_rect_location_;
}
- if (mask_for_background())
+ if (mask_for_background_)
locations->original_backdrop = original_backdrop_location_;
if (has_mask_sampler_) {
locations->mask_sampler = mask_sampler_location_;
@@ -519,7 +519,7 @@ std::string FragmentShaderBase::SetBlendModeFunctions(
});
std::string mixFunction;
- if (mask_for_background()) {
+ if (mask_for_background_) {
mixFunction = SHADER0([]() {
vec4 MixBackdrop(TexCoordPrecision vec2 bgTexCoord, float mask) {
vec4 backdrop = texture2D(s_backdropTexture, bgTexCoord);
« no previous file with comments | « cc/output/shader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698