代码拉取完成,页面将自动刷新
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef BitmapRegionDecoder_DEFINED
#define BitmapRegionDecoder_DEFINED
#include "client_utils/android/BRDAllocator.h"
#include "include/codec/SkAndroidCodec.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkData.h"
namespace android {
namespace skia {
class BitmapRegionDecoder final {
public:
static std::unique_ptr<BitmapRegionDecoder> Make(sk_sp<SkData> data);
bool decodeRegion(SkBitmap* bitmap, BRDAllocator* allocator,
const SkIRect& desiredSubset, int sampleSize,
SkColorType colorType, bool requireUnpremul,
sk_sp<SkColorSpace> prefColorSpace);
SkEncodedImageFormat getEncodedFormat() { return fCodec->getEncodedFormat(); }
SkColorType computeOutputColorType(SkColorType requestedColorType) {
return fCodec->computeOutputColorType(requestedColorType);
}
sk_sp<SkColorSpace> computeOutputColorSpace(SkColorType outputColorType,
sk_sp<SkColorSpace> prefColorSpace = nullptr) {
return fCodec->computeOutputColorSpace(outputColorType, prefColorSpace);
}
int width() const;
int height() const;
private:
BitmapRegionDecoder(std::unique_ptr<SkAndroidCodec> codec);
std::unique_ptr<SkAndroidCodec> fCodec;
};
} // namespace skia
} // namespace android
#endif // BitmapRegionDecoder_DEFINED
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。