diff options
author | Haixia Shi <hshi@chromium.org> | 2015-11-23 11:34:36 -0800 |
---|---|---|
committer | Haixia Shi <hshi@chromium.org> | 2015-11-23 11:42:26 -0800 |
commit | 0c7da1e236c3a31a5bc171aac4d5f2a1033f10e1 (patch) | |
tree | 8c562ceb23afb34ba8ea92e41dded5bb1f1ad21a /drmdisplaycompositor.cpp | |
parent | 4fdafe6d988b5cac91b5448e197891508b5e6e2d (diff) |
drm_hwcomposer: set blending mode to kPreMult for GL output
The correct blending mode for the GL output is actually premult, because
regardless of the original layer blending mode, the result RGB components
are always pre-multiplied with alpha already.
This prevents the result of a SquashAll() from getting multiplied by
alpha twice.
BUG=25838542
TEST=verify the blinking is fixed on the status bar icons
Change-Id: Ie5bbc53110c342576b81818da6069cba201db609
Diffstat (limited to 'drmdisplaycompositor.cpp')
-rw-r--r-- | drmdisplaycompositor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp index 4a904b2..f1d925a 100644 --- a/drmdisplaycompositor.cpp +++ b/drmdisplaycompositor.cpp @@ -399,7 +399,7 @@ int DrmDisplayCompositor::PrepareFramebuffer( display_comp->layers().emplace_back(); DrmHwcLayer &pre_comp_layer = display_comp->layers().back(); pre_comp_layer.sf_handle = fb.buffer()->handle; - pre_comp_layer.blending = DrmHwcBlending::kCoverage; + pre_comp_layer.blending = DrmHwcBlending::kPreMult; pre_comp_layer.source_crop = DrmHwcRect<float>(0, 0, width, height); pre_comp_layer.display_frame = DrmHwcRect<int>(0, 0, width, height); ret = pre_comp_layer.buffer.ImportBuffer(fb.buffer()->handle, @@ -543,7 +543,7 @@ int DrmDisplayCompositor::PrepareFrame(DrmDisplayComposition *display_comp) { return ret; } squash_layer.sf_handle = fb.buffer()->handle; - squash_layer.blending = DrmHwcBlending::kCoverage; + squash_layer.blending = DrmHwcBlending::kPreMult; squash_layer.source_crop = DrmHwcRect<float>( 0, 0, squash_layer.buffer->width, squash_layer.buffer->height); squash_layer.display_frame = DrmHwcRect<int>( |