aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gyp/common_conditions.gypi2
-rw-r--r--gyp/skia_for_chromium_defines.gypi1
-rw-r--r--src/gpu/SkGr.cpp10
3 files changed, 7 insertions, 6 deletions
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index 6dcdca884d..cf46ed21d9 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -6,7 +6,6 @@
'SK_SUPPORT_GPU=<(skia_gpu)',
'SK_SUPPORT_OPENCL=<(skia_opencl)',
'SK_FORCE_DISTANCEFIELD_FONTS=<(skia_force_distancefield_fonts)',
- 'SK_SUPPORT_ETC1'
],
'conditions' : [
[ 'skia_arch_type == "arm64"', {
@@ -320,6 +319,7 @@
'SK_ATTR_DEPRECATED=SK_NOTHING_ARG1',
'SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX',
'SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)',
+ 'SK_IGNORE_ETC1_SUPPORT',
# Defines from skia_for_android_framework_defines.gypi
'<@(skia_for_android_framework_defines)',
],
diff --git a/gyp/skia_for_chromium_defines.gypi b/gyp/skia_for_chromium_defines.gypi
index 0f4a3f836a..e9003cdf27 100644
--- a/gyp/skia_for_chromium_defines.gypi
+++ b/gyp/skia_for_chromium_defines.gypi
@@ -21,6 +21,7 @@
'SK_IGNORE_CORRECT_HIGH_QUALITY_IMAGE_SCALE',
'SK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS',
'SK_SUPPORT_LEGACY_IMAGEGENERATORAPI',
+ 'SK_IGNORE_ETC1_SUPPORT',
],
},
}
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 9dc215c735..596e574198 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -15,7 +15,7 @@
#include "GrGpu.h"
#include "GrDrawTargetCaps.h"
-#if SK_SUPPORT_ETC1
+#ifndef SK_IGNORE_ETC1_SUPPORT
# include "etc1.h"
#endif
@@ -131,7 +131,7 @@ static void add_genID_listener(GrResourceKey key, SkPixelRef* pixelRef) {
pixelRef->addGenIDChangeListener(SkNEW_ARGS(GrResourceInvalidator, (key)));
}
-#if SK_SUPPORT_ETC1
+#ifndef SK_IGNORE_ETC1_SUPPORT
static GrTexture *load_etc1_texture(GrContext* ctx,
const GrTextureParams* params,
const SkBitmap &bm, GrTextureDesc desc) {
@@ -173,7 +173,7 @@ static GrTexture *load_etc1_texture(GrContext* ctx,
}
return result;
}
-#endif // SK_SUPPORT_ETC1
+#endif // SK_IGNORE_ETC1_SUPPORT
static GrTexture* sk_gr_create_bitmap_texture(GrContext* ctx,
bool cache,
@@ -226,14 +226,14 @@ static GrTexture* sk_gr_create_bitmap_texture(GrContext* ctx,
}
// Is this an ETC1 encoded texture?
-#if SK_SUPPORT_ETC1
+#ifndef SK_IGNORE_ETC1_SUPPORT
else if (cache && ctx->getGpu()->caps()->isConfigTexturable(kETC1_GrPixelConfig)) {
GrTexture *texture = load_etc1_texture(ctx, params, *bitmap, desc);
if (NULL != texture) {
return texture;
}
}
-#endif // SK_SUPPORT_ETC1
+#endif // SK_IGNORE_ETC1_SUPPORT
SkAutoLockPixels alp(*bitmap);
if (!bitmap->readyToDraw()) {