diff options
author | Steven Laver <lavers@google.com> | 2019-01-20 16:40:46 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-01-20 16:40:46 +0000 |
commit | c470daee1cf372142e66d4786f98b157f284dacb (patch) | |
tree | c118879b496f19919078294bd68a7867dc7e5d0f /libs/hwui/pipeline/skia/ShaderCache.cpp | |
parent | be058067720e1688137c15e68d5c4e50c4d66904 (diff) | |
parent | 67924d836712134f300f2952dad900daa5f3c98d (diff) |
Merge changes from topic "QP1A.190107.001" into q-keystone-qcom-dev
* changes:
Clear verification completed flag if an optional verifier is used
telephony: hide added members in DisconnectCause
location: fix build errors
Update CarrierIdentifier constructors to match public API signature
remove duplicate 'data_connection_5g'
Move persist.debug.trace handling to frameworks
Merge QP1A.190107.001
Diffstat (limited to 'libs/hwui/pipeline/skia/ShaderCache.cpp')
-rw-r--r-- | libs/hwui/pipeline/skia/ShaderCache.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/libs/hwui/pipeline/skia/ShaderCache.cpp b/libs/hwui/pipeline/skia/ShaderCache.cpp index 073b4814305e..562a3b225e36 100644 --- a/libs/hwui/pipeline/skia/ShaderCache.cpp +++ b/libs/hwui/pipeline/skia/ShaderCache.cpp @@ -15,11 +15,11 @@ */ #include "ShaderCache.h" -#include <algorithm> #include <log/log.h> -#include <thread> -#include <array> #include <openssl/sha.h> +#include <algorithm> +#include <array> +#include <thread> #include "FileBlobCache.h" #include "Properties.h" #include "utils/TraceUtils.h" @@ -44,8 +44,7 @@ ShaderCache& ShaderCache::get() { } bool ShaderCache::validateCache(const void* identity, ssize_t size) { - if (nullptr == identity && size == 0) - return true; + if (nullptr == identity && size == 0) return true; if (nullptr == identity || size < 0) { if (CC_UNLIKELY(Properties::debugLevel & kDebugCaches)) { @@ -66,8 +65,7 @@ bool ShaderCache::validateCache(const void* identity, ssize_t size) { auto key = sIDKey; auto loaded = mBlobCache->get(&key, sizeof(key), hash.data(), hash.size()); - if (loaded && std::equal(hash.begin(), hash.end(), mIDHash.begin())) - return true; + if (loaded && std::equal(hash.begin(), hash.end(), mIDHash.begin())) return true; if (CC_UNLIKELY(Properties::debugLevel & kDebugCaches)) { ALOGW("ShaderCache::validateCache cache validation fails"); @@ -119,7 +117,7 @@ sk_sp<SkData> ShaderCache::load(const SkData& key) { int maxTries = 3; while (valueSize > mObservedBlobValueSize && maxTries > 0) { mObservedBlobValueSize = std::min(valueSize, maxValueSize); - void *newValueBuffer = realloc(valueBuffer, mObservedBlobValueSize); + void* newValueBuffer = realloc(valueBuffer, mObservedBlobValueSize); if (!newValueBuffer) { free(valueBuffer); return nullptr; @@ -133,7 +131,7 @@ sk_sp<SkData> ShaderCache::load(const SkData& key) { return nullptr; } if (valueSize > mObservedBlobValueSize) { - ALOGE("ShaderCache::load value size is too big %d", (int) valueSize); + ALOGE("ShaderCache::load value size is too big %d", (int)valueSize); free(valueBuffer); return nullptr; } |