Remove SkKTXImageEncoder

It escaped the chopping block when we deleted the decoder, but it is
currently untested and unused as far as we know. In addition to
removing effectively unsupported code, this simplifies build file
changes (i.e. don't build it on Android framework, but build it
elsewhere) as we narrow our build systems down to one.

Change-Id: I3b960fdcc369fb947be282933ddba48e407ab3ad
Reviewed-on: https://skia-review.googlesource.com/6031
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This commit is contained in:
Leon Scroggins III 2016-12-14 10:33:10 -05:00 committed by Skia Commit-Bot
parent 78c212a719
commit 95ada6ee73
5 changed files with 0 additions and 54 deletions

View File

@ -578,7 +578,6 @@ component("skia") {
"src/codec/SkSwizzler.cpp",
"src/codec/SkWbmpCodec.cpp",
"src/images/SkImageEncoder.cpp",
"src/images/SkKTXImageEncoder.cpp",
"src/ports/SkDiscardableMemory_none.cpp",
"src/ports/SkGlobalInitialization_default.cpp",
"src/ports/SkImageGenerator_skia.cpp",

View File

@ -15,7 +15,6 @@
'core.gyp:*',
'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
'etc1.gyp:libetc1',
'ktx.gyp:libSkKTX',
'libpng.gyp:libpng',
'libwebp.gyp:libwebp',
'utils.gyp:utils',
@ -30,7 +29,6 @@
'../src/image/',
],
'sources': [
'../src/images/SkKTXImageEncoder.cpp',
'../src/images/SkWEBPImageEncoder.cpp',
'../src/images/SkJPEGImageEncoder.cpp',
'../src/images/SkPNGImageEncoder.cpp',
@ -66,15 +64,6 @@
'dependencies': [
'libpng.gyp:libpng',
],
'conditions': [
[ 'skia_android_framework == 1', {
# The android framework disables these decoders as they are of little use to
# Java applications that can't take advantage of the compressed formats.
'sources!': [
'../src/images/SkKTXImageEncoder.cpp',
],
}],
],
}],
[ 'skia_os == "ios"', {
'include_dirs': [

View File

@ -19,7 +19,6 @@ bool SkEncodeImage(SkWStream* dst, const SkPixmap& src,
case SkEncodedImageFormat::kJPEG: return SkEncodeImageAsJPEG(dst, src, quality);
case SkEncodedImageFormat::kPNG: return SkEncodeImageAsPNG(dst, src);
case SkEncodedImageFormat::kWEBP: return SkEncodeImageAsWEBP(dst, src, quality);
case SkEncodedImageFormat::kKTX: return SkEncodeImageAsKTX(dst, src);
default: return false;
}
#endif

View File

@ -28,12 +28,6 @@
#define SkEncodeImageAsWEBP(...) false
#endif
#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK
bool SkEncodeImageAsKTX(SkWStream*, const SkPixmap&);
#else
#define SkEncodeImageAsKTX(...) false
#endif
#if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
bool SkEncodeImageWithCG(SkWStream*, const SkPixmap&, SkEncodedImageFormat);
#else

View File

@ -1,35 +0,0 @@
/*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkImageEncoderPriv.h"
#include "SkColorPriv.h"
#include "SkImageGenerator.h"
#include "SkPixelRef.h"
#include "SkStream.h"
#include "SkStreamPriv.h"
#include "ktx.h"
#include "etc1.h"
///////////////////////////////////////////////////////////////////////////////
// KTX Image Encoder
//
// KTX is a general texture data storage file format ratified by the Khronos Group. As an
// overview, a KTX file contains all of the appropriate values needed to fully specify a
// texture in an OpenGL application, including the use of compressed data.
//
// This encoder takes a best guess at how to encode the bitmap passed to it.
// The KTX library tries to do its best to encode the appropriate
// data specified by the bitmap based on the config. (i.e. kAlpha8_Config will
// be represented as a full resolution 8-bit image dump with the appropriate
// OpenGL defines in the header).
bool SkEncodeImageAsKTX(SkWStream* stream, const SkPixmap& pixmap) {
return SkKTXFile::WritePixmapToKTX(stream, pixmap);
}