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

Unified Diff: cc/output/program_binding.h

Issue 658483003: Implement mix-blend-mode in GL renderer using shaders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing antialiasing issues Created 6 years, 2 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: cc/output/program_binding.h
diff --git a/cc/output/program_binding.h b/cc/output/program_binding.h
index 912329ef6bf548055ad6a07de577f12040af4936..95cd81a999e82741f7aba637f6e7c5af06b65580 100644
--- a/cc/output/program_binding.h
+++ b/cc/output/program_binding.h
@@ -58,13 +58,16 @@ class ProgramBinding : public ProgramBindingBase {
void Initialize(ContextProvider* context_provider,
TexCoordPrecision precision,
- SamplerType sampler) {
+ SamplerType sampler,
+ SkXfermode::Mode blend_mode = SkXfermode::kSrcOver_Mode) {
DCHECK(context_provider);
DCHECK(!initialized_);
if (context_provider->IsContextLost())
return;
+ fragment_shader_.SetBlendMode(blend_mode);
+
if (!ProgramBindingBase::Init(
context_provider->ContextGL(),
vertex_shader_.GetShaderString(),

Powered by Google App Engine
This is Rietveld 408576698