diff options
| author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-07 16:41:47 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-07 16:41:47 -0700 |
| commit | 4e3fb8615639934fe2522c643c855ae1050c5e8e (patch) | |
| tree | d118da455e68c355889ec1322f7255d8cf122b7a | |
| parent | 6753c2bc238fe474b1052af6573b51bd8a121bc5 (diff) | |
| parent | 665a2227e5212c6a7452f080d87f377b8471a8b0 (diff) | |
| download | system_core-4e3fb8615639934fe2522c643c855ae1050c5e8e.tar.gz system_core-4e3fb8615639934fe2522c643c855ae1050c5e8e.tar.bz2 system_core-4e3fb8615639934fe2522c643c855ae1050c5e8e.zip | |
Merge change 20502
* changes:
we actually have to saturate when doing premultilied blending with opengl
| -rw-r--r-- | libpixelflinger/codeflinger/blending.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/libpixelflinger/codeflinger/blending.cpp b/libpixelflinger/codeflinger/blending.cpp index f10217b7..083042ce 100644 --- a/libpixelflinger/codeflinger/blending.cpp +++ b/libpixelflinger/codeflinger/blending.cpp @@ -221,17 +221,7 @@ void GGLAssembler::build_blending( build_blend_factor(dst_factor, fd, component, pixel, fragment, fb, scratches); mul_factor_add(temp, fb, dst_factor, component_t(fragment)); - if (fd==GGL_ONE_MINUS_SRC_ALPHA) { - // XXX: in theory this is not correct, we should - // saturate here. However, this mode is often - // used for displaying alpha-premultiplied graphics, - // in which case, saturation is not necessary. - // unfortunatelly, we have no way to know. - // This is a case, where we sacrifice correctness for - // performance. we should probably have some heuristics. - } else { - component_sat(temp); - } + component_sat(temp); } } else { // compute fs |
