| Index: src/gpu/SkGr.cpp
|
| diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
|
| index 716909133a733d28bb03efafe13d214384e47d98..4f7af1566c7670cb5373f7f76d9f19af43ef0de0 100644
|
| --- a/src/gpu/SkGr.cpp
|
| +++ b/src/gpu/SkGr.cpp
|
| @@ -22,6 +22,7 @@
|
| #include "SkConfig8888.h"
|
| #include "SkCanvas.h"
|
| #include "SkData.h"
|
| +#include "SkEncodedFormat.h"
|
| #include "SkErrorInternals.h"
|
| #include "SkGrPixelRef.h"
|
| #include "SkMessageBus.h"
|
| @@ -66,6 +67,21 @@ void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, const SkIRect& ima
|
| builder[4] = imageBounds.fBottom;
|
| }
|
|
|
| +bool GrIsCompressedFormatPossiblySupported(GrContext* ctx, SkEncodedFormat format) {
|
| +#ifndef SK_IGNORE_ETC1_SUPPORT
|
| + if (!ctx->caps()->isConfigTexturable(kETC1_GrPixelConfig)) {
|
| + return false;
|
| + }
|
| + switch (format) {
|
| + case kPKM_SkEncodedFormat: // file format for ETC1
|
| + return true;
|
| + default:
|
| + return false;
|
| + }
|
| +#endif
|
| + return false;
|
| +}
|
| +
|
| GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data,
|
| int expectedW, int expectedH,
|
| const void** outStartOfDataToUpload) {
|
|
|