remove unused etc logic
Bug: skia: Change-Id: I913d348910db0b6ab930c4c5566ba9eb2320550e Reviewed-on: https://skia-review.googlesource.com/15181 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
24b2063a48
commit
91b43e4fa3
@ -272,7 +272,6 @@ defines.extend([
|
||||
'SK_BUILD_FOR_ANDROID_FRAMEWORK',
|
||||
'SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)',
|
||||
'SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)',
|
||||
'SK_IGNORE_ETC1_SUPPORT',
|
||||
'SK_USE_FREETYPE_EMBOLDEN',
|
||||
])
|
||||
# TODO: move these all to android_framework_defines.gni?
|
||||
|
@ -643,7 +643,6 @@ DEFINES_IOS = [
|
||||
"SK_BUILD_FOR_IOS",
|
||||
"SK_BUILD_NO_OPTS",
|
||||
"SK_HAS_JPEG_LIBRARY",
|
||||
"SK_IGNORE_ETC1_SUPPORT",
|
||||
"SKNX_NO_SIMD",
|
||||
]
|
||||
|
||||
|
@ -37,10 +37,6 @@
|
||||
#include "effects/GrPorterDuffXferProcessor.h"
|
||||
#include "effects/GrXfermodeFragmentProcessor.h"
|
||||
|
||||
#ifndef SK_IGNORE_ETC1_SUPPORT
|
||||
# include "etc1.h"
|
||||
#endif
|
||||
|
||||
GrSurfaceDesc GrImageInfoToSurfaceDesc(const SkImageInfo& info, const GrCaps& caps) {
|
||||
GrSurfaceDesc desc;
|
||||
desc.fFlags = kNone_GrSurfaceFlags;
|
||||
@ -64,32 +60,6 @@ void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, const SkIRect& ima
|
||||
builder[4] = imageBounds.fBottom;
|
||||
}
|
||||
|
||||
GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data,
|
||||
int expectedW, int expectedH,
|
||||
const void** outStartOfDataToUpload) {
|
||||
*outStartOfDataToUpload = nullptr;
|
||||
#ifndef SK_IGNORE_ETC1_SUPPORT
|
||||
if (!ctx->caps()->isConfigTexturable(kETC1_GrPixelConfig)) {
|
||||
return kUnknown_GrPixelConfig;
|
||||
}
|
||||
|
||||
const uint8_t* bytes = data->bytes();
|
||||
if (data->size() > ETC_PKM_HEADER_SIZE && etc1_pkm_is_valid(bytes)) {
|
||||
// Does the data match the dimensions of the bitmap? If not,
|
||||
// then we don't know how to scale the image to match it...
|
||||
if (etc1_pkm_get_width(bytes) != (unsigned)expectedW ||
|
||||
etc1_pkm_get_height(bytes) != (unsigned)expectedH)
|
||||
{
|
||||
return kUnknown_GrPixelConfig;
|
||||
}
|
||||
|
||||
*outStartOfDataToUpload = bytes + ETC_PKM_HEADER_SIZE;
|
||||
return kETC1_GrPixelConfig;
|
||||
}
|
||||
#endif
|
||||
return kUnknown_GrPixelConfig;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
sk_sp<GrTextureProxy> GrUploadBitmapToTextureProxy(GrResourceProvider* resourceProvider,
|
||||
const SkBitmap& bitmap) {
|
||||
|
@ -271,18 +271,4 @@ void GrInstallBitmapUniqueKeyInvalidator(const GrUniqueKey& key, SkPixelRef* pix
|
||||
to use. */
|
||||
GrPixelConfig GrRenderableConfigForColorSpace(const SkColorSpace*);
|
||||
|
||||
/**
|
||||
* If the compressed data in the SkData is supported (as a texture format, this returns
|
||||
* the pixel-config that should be used, and sets outStartOfDataToUpload to the ptr into
|
||||
* the data where the actual raw data starts (skipping any header bytes).
|
||||
*
|
||||
* If the compressed data is not supported, this returns kUnknown_GrPixelConfig, and
|
||||
* ignores outStartOfDataToUpload.
|
||||
*/
|
||||
GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data,
|
||||
int expectedW, int expectedH,
|
||||
const void** outStartOfDataToUpload);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user