SkImageEncoder: simplify API
authorHal Canary <halcanary@google.com>
Tue, 22 Nov 2016 16:03:03 +0000 (09:03 -0700)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Tue, 22 Nov 2016 18:25:55 +0000 (18:25 +0000)
commit248ff02331d7f73ee4b6c5a7eabeae1080c16cd4
treea55e2402ef1494e2fb719bc046f1f97c8e75da53
parent46e66a2bf51546a7c3b08625769899b9ead56ec6
SkImageEncoder: simplify API

  - Hide SkImageEncoder class in private header.
  - SkImageEncoder::Type becomes SkEncodedImageFormat
  - SkEncodedFormat becomes SkEncodedImageFormat
  - SkImageEncoder static functions replaced with
    single function EncodeImage()
  - utility wrappers for EncodeImage() are in
    sk_tool_utils.h

TODO: remove link-time registration mechanism.
TODO: clean up clients use of API and flip the flag.
TODO: implement EncodeImage() in chromeium/skia/ext

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4909

Change-Id: Ib48b31fdc05cf23cda7f56ebfd67c841c149ce70
Reviewed-on: https://skia-review.googlesource.com/4909
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
67 files changed:
BUILD.gn
bench/EncoderBench.cpp
bench/GLBench.cpp
bench/nanobench.cpp
cmake/example.cpp
debugger/QT/SkDebuggerGUI.cpp
dm/DM.cpp
fuzz/fuzz.cpp
gm/encode-platform.cpp
gm/encode.cpp
gm/image.cpp
gm/image_shader.cpp
gn/android_framework_defines.gni
include/codec/SkAndroidCodec.h
include/codec/SkCodec.h
include/codec/SkEncodedFormat.h
include/core/SkEncodedImageFormat.h [new file with mode: 0644]
include/core/SkImage.h
include/core/SkImageEncoder.h
public.bzl
samplecode/SampleApp.cpp
samplecode/SampleSlides.cpp
src/android/SkBitmapRegionCodec.h
src/android/SkBitmapRegionDecoder.cpp
src/animator/SkSnapshot.cpp
src/animator/SkSnapshot.h
src/codec/SkAndroidCodec.cpp
src/codec/SkBmpCodec.h
src/codec/SkGifCodec.h
src/codec/SkIcoCodec.h
src/codec/SkJpegCodec.h
src/codec/SkPngCodec.h
src/codec/SkRawAdapterCodec.h
src/codec/SkRawCodec.h
src/codec/SkSampledCodec.cpp
src/codec/SkWbmpCodec.cpp
src/codec/SkWbmpCodec.h
src/codec/SkWebpCodec.h
src/gpu/GrSurface.cpp
src/image/SkImage.cpp
src/images/SkForceLinking.cpp
src/images/SkImageEncoder.cpp
src/images/SkImageEncoderPriv.h [new file with mode: 0644]
src/images/SkImageEncoder_Factory.cpp
src/images/SkJPEGImageEncoder.cpp
src/images/SkKTXImageEncoder.cpp
src/images/SkPNGImageEncoder.cpp
src/images/SkWEBPImageEncoder.cpp
src/ports/SkImageEncoder_CG.cpp
src/ports/SkImageEncoder_WIC.cpp
src/ports/SkImageEncoder_none.cpp
src/svg/SkSVGDevice.cpp
src/xps/SkXPSDevice.cpp
tests/BlitRowTest.cpp
tests/CodecTest.cpp
tests/ImageTest.cpp
tests/PDFDocumentTest.cpp
tests/PathOpsConicIntersectionTest.cpp
tests/PathOpsSkpClipTest.cpp
tests/SkpSkGrTest.cpp
tools/colorspaceinfo.cpp
tools/get_images_from_skps.cpp
tools/imgblur.cpp
tools/picture_utils.cpp
tools/sk_tool_utils.h
tools/skdiff/skdiff_utils.cpp
tools/skiaserve/Request.cpp