diff options
author | Chris Craik <ccraik@google.com> | 2015-03-06 18:44:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-06 18:44:17 +0000 |
commit | 97a351a329dd736628f03e3b4061ac45f5990b0d (patch) | |
tree | 2f9e1bcd5ee24237f7d492a9bd720e7f7830356c /libs | |
parent | 2d08eaf0341df5d22236baadbcc4341f0e2e7f5e (diff) | |
parent | 1c1c3fe9ebde8f911da65d49bdb91af583453dc6 (diff) | |
download | frameworks_base-97a351a329dd736628f03e3b4061ac45f5990b0d.zip frameworks_base-97a351a329dd736628f03e3b4061ac45f5990b0d.tar.gz frameworks_base-97a351a329dd736628f03e3b4061ac45f5990b0d.tar.bz2 |
Merge "Avoid invalid shader creation for certain blend modes"
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/ProgramCache.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp index 8c6a91cc..7ad4a57 100644 --- a/libs/hwui/ProgramCache.cpp +++ b/libs/hwui/ProgramCache.cpp @@ -777,6 +777,9 @@ String8 ProgramCache::generateFragmentShader(const ProgramDescription& descripti } void ProgramCache::generateBlend(String8& shader, const char* name, SkXfermode::Mode mode) { + // TODO: update gBlendOps so this workaround isn't necessary + if (mode > SkXfermode::kPlus_Mode) mode = SkXfermode::kClear_Mode; + shader.append("\nvec4 "); shader.append(name); shader.append("(vec4 src, vec4 dst) {\n"); @@ -830,7 +833,7 @@ void ProgramCache::printLongString(const String8& shader) const { while ((index = shader.find("\n", index)) > -1) { String8 line(str, index - lastIndex); if (line.length() == 0) line.append("\n"); - PROGRAM_LOGD("%s", line.string()); + ALOGD("%s", line.string()); index++; str += (index - lastIndex); lastIndex = index; |