From b54beedcc27bea274dba8bdaa55948d4a0447a63 Mon Sep 17 00:00:00 2001 From: "alokp@chromium.org" Date: Sat, 29 Jun 2013 00:35:12 +0000 Subject: Premultiply alpha in shader for non-premultiplied textures. Instead of using different blending equations we can perform the pre-multiplication in the shader itself. I am working on improving the performance of compositing canvas elements with opaque background. This requires blending the canvas texture with the background color in the shader. The implementation of this blending equation becomes much easier if we can assume that textures are always premultiplied. BUG=236982 TEST=compositing/webgl/webgl-nonpremultiplied-blend.html Review URL: https://chromiumcodereview.appspot.com/16943021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209246 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/output/gl_renderer_draw_cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cc/output/gl_renderer_draw_cache.h') diff --git a/cc/output/gl_renderer_draw_cache.h b/cc/output/gl_renderer_draw_cache.h index e99cc27..85369ef 100644 --- a/cc/output/gl_renderer_draw_cache.h +++ b/cc/output/gl_renderer_draw_cache.h @@ -31,7 +31,6 @@ struct TexturedQuadDrawCache { // Values tracked to determine if textured quads may be coalesced. int program_id; int resource_id; - bool use_premultiplied_alpha; bool needs_blending; // Information about the program binding that is required to draw. @@ -45,6 +44,7 @@ struct TexturedQuadDrawCache { std::vector vertex_opacity_data; std::vector matrix_data; + private: DISALLOW_COPY_AND_ASSIGN(TexturedQuadDrawCache); }; -- cgit v1.1