remove tricky asint
Bug: skia: Change-Id: I8d5f9b29b48273a3648dfe925ff3e9e8d0ee71f3 Reviewed-on: https://skia-review.googlesource.com/c/187060 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com> Auto-Submit: Mike Reed <reed@google.com>
This commit is contained in:
parent
5d982feca8
commit
f6a2348535
@ -359,10 +359,6 @@ void SkPaint::setLooper(sk_sp<SkDrawLooper> looper) { fDrawLooper = std::move(lo
|
||||
|
||||
#include "SkStream.h"
|
||||
|
||||
static uintptr_t asint(const void* p) {
|
||||
return reinterpret_cast<uintptr_t>(p);
|
||||
}
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
static void ASSERT_FITS_IN(uint32_t value, int bitCount) {
|
||||
SkASSERT(bitCount > 0 && bitCount <= 32);
|
||||
@ -495,12 +491,12 @@ static uint32_t unpack_v68(SkPaint* paint, uint32_t packed, SkSafeRange& safe) {
|
||||
void SkPaintPriv::Flatten(const SkPaint& paint, SkWriteBuffer& buffer) {
|
||||
uint8_t flatFlags = 0;
|
||||
|
||||
if (asint(paint.getPathEffect()) |
|
||||
asint(paint.getShader()) |
|
||||
asint(paint.getMaskFilter()) |
|
||||
asint(paint.getColorFilter()) |
|
||||
asint(paint.getLooper()) |
|
||||
asint(paint.getImageFilter())) {
|
||||
if (paint.getPathEffect() ||
|
||||
paint.getShader() ||
|
||||
paint.getMaskFilter() ||
|
||||
paint.getColorFilter() ||
|
||||
paint.getLooper() ||
|
||||
paint.getImageFilter()) {
|
||||
flatFlags |= kHasEffects_FlatFlag;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user