diff options
author | Scott Lobdell <slobdell@google.com> | 2021-03-29 16:12:49 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-04-02 22:35:29 +0000 |
commit | 21cdef883cc867db55340b25d5c95e19b12ab383 (patch) | |
tree | 93d1444ebe783f53f5f0ae2647592723b27b3fb8 /libs/hwui/utils/PaintUtils.h | |
parent | 7deab3736bb5f3a92be8ac820096926dce2366ad (diff) | |
parent | d1d45f856fdf68835f5b42eacecab44e6dfa8545 (diff) |
Merge SP1A.210329.001
Change-Id: I1e21c5890b5b2e2f2855f09960bc8eec8aa922bf
Diffstat (limited to 'libs/hwui/utils/PaintUtils.h')
-rw-r--r-- | libs/hwui/utils/PaintUtils.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libs/hwui/utils/PaintUtils.h b/libs/hwui/utils/PaintUtils.h index 09c6a4fdf50d..a8f2d9a28d67 100644 --- a/libs/hwui/utils/PaintUtils.h +++ b/libs/hwui/utils/PaintUtils.h @@ -52,18 +52,10 @@ public: return mode == SkBlendMode::kSrcOver || mode == SkBlendMode::kSrc; } - static bool isBlendedShader(const SkShader* shader) { - if (shader == nullptr) { - return false; - } - return !shader->isOpaque(); - } + static bool isBlendedShader(const SkShader* shader) { return shader && !shader->isOpaque(); } static bool isBlendedColorFilter(const SkColorFilter* filter) { - if (filter == nullptr) { - return false; - } - return (filter->getFlags() & SkColorFilter::kAlphaUnchanged_Flag) == 0; + return filter && !filter->isAlphaUnchanged(); } static inline SkBlendMode getBlendModeDirect(const SkPaint* paint) { |