Commit Graph

19 Commits

Author SHA1 Message Date
msarett
e8597a4dd0 Delete SkImageDecoder
This image decoding implementation has been replaced
by SkCodec in Android.

Additionally, we have replaced uses of SkImageDecoder
in Skia and Google3 with uses of SkCodec.

Now we can delete SkImageDecoder :).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820503002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Committed: https://skia.googlesource.com/skia/+/f799706656f2581c5bf5510d94df3fa17cce1607

Committed: https://skia.googlesource.com/skia/+/5b6e73e0c8282c4d85accbfbcecc6dee84f8a1eb

Committed: https://skia.googlesource.com/skia/+/f037fdebda2a2626e6512d7532063f2cd41a264d

Review URL: https://codereview.chromium.org/1820503002
2016-03-24 10:41:47 -07:00
msarett
910f7ec7e7 Revert of Delete SkImageDecoder (patchset #9 id:150001 of https://codereview.chromium.org/1820503002/ )
Reason for revert:
Roll still failing

Original issue's description:
> Delete SkImageDecoder
>
> This image decoding implementation has been replaced
> by SkCodec in Android.
>
> Additionally, we have replaced uses of SkImageDecoder
> in Skia and Google3 with uses of SkCodec.
>
> Now we can delete SkImageDecoder :).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820503002
> CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/f799706656f2581c5bf5510d94df3fa17cce1607
>
> Committed: https://skia.googlesource.com/skia/+/5b6e73e0c8282c4d85accbfbcecc6dee84f8a1eb
>
> Committed: https://skia.googlesource.com/skia/+/f037fdebda2a2626e6512d7532063f2cd41a264d

TBR=scroggo@google.com,djsollen@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1830943002
2016-03-24 04:45:39 -07:00
msarett
f037fdebda Delete SkImageDecoder
This image decoding implementation has been replaced
by SkCodec in Android.

Additionally, we have replaced uses of SkImageDecoder
in Skia and Google3 with uses of SkCodec.

Now we can delete SkImageDecoder :).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820503002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Committed: https://skia.googlesource.com/skia/+/f799706656f2581c5bf5510d94df3fa17cce1607

Committed: https://skia.googlesource.com/skia/+/5b6e73e0c8282c4d85accbfbcecc6dee84f8a1eb

Review URL: https://codereview.chromium.org/1820503002
2016-03-23 19:19:28 -07:00
msarett
041c870425 Revert of Delete SkImageDecoder (patchset #8 id:130001 of https://codereview.chromium.org/1820503002/ )
Reason for revert:
Testing the roll - it's still failing

Original issue's description:
> Delete SkImageDecoder
>
> This image decoding implementation has been replaced
> by SkCodec in Android.
>
> Additionally, we have replaced uses of SkImageDecoder
> in Skia and Google3 with uses of SkCodec.
>
> Now we can delete SkImageDecoder :).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820503002
> CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/f799706656f2581c5bf5510d94df3fa17cce1607
>
> Committed: https://skia.googlesource.com/skia/+/5b6e73e0c8282c4d85accbfbcecc6dee84f8a1eb

TBR=scroggo@google.com,djsollen@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1828433004
2016-03-23 18:52:40 -07:00
msarett
5b6e73e0c8 Delete SkImageDecoder
This image decoding implementation has been replaced
by SkCodec in Android.

Additionally, we have replaced uses of SkImageDecoder
in Skia and Google3 with uses of SkCodec.

Now we can delete SkImageDecoder :).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820503002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Committed: https://skia.googlesource.com/skia/+/f799706656f2581c5bf5510d94df3fa17cce1607

Review URL: https://codereview.chromium.org/1820503002
2016-03-23 18:10:14 -07:00
halcanary
f2848b6035 default SkPixelSerializer
Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.

Add SkImageEncoder::CreatePixelSerializer() to return a
PixelSerializer that calls into SkImageEncoder::EncodeData.

SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.

Committed: https://skia.googlesource.com/skia/+/b0bd1516bff3f5afcbfd615e805867531657811b

Committed: https://skia.googlesource.com/skia/+/808ce2886d732b1055f89c8fb0f1b11b47fcb0ce

Review URL: https://codereview.chromium.org/1507123002
2015-12-10 12:40:23 -08:00
halcanary
a2e056773d Revert of default SkPixelSerializer (patchset #2 id:20001 of https://codereview.chromium.org/1507123002/ )
Reason for revert:
I was overconfident.

Original issue's description:
> default SkPixelSerializer
>
> Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.
>
> Add SkImageEncoder::CreatePixelSerializer() to return a
> PixelSerializer that calls into SkImageEncoder::EncodeData.
>
> SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.
>
> Committed: https://skia.googlesource.com/skia/+/b0bd1516bff3f5afcbfd615e805867531657811b
>
> Committed: https://skia.googlesource.com/skia/+/808ce2886d732b1055f89c8fb0f1b11b47fcb0ce

TBR=reed@google.com,scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1511183002
2015-12-09 03:56:02 -08:00
halcanary
808ce2886d default SkPixelSerializer
Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.

Add SkImageEncoder::CreatePixelSerializer() to return a
PixelSerializer that calls into SkImageEncoder::EncodeData.

SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.

Committed: https://skia.googlesource.com/skia/+/b0bd1516bff3f5afcbfd615e805867531657811b

Review URL: https://codereview.chromium.org/1507123002
2015-12-08 19:02:36 -08:00
reed
290f00cd75 Revert of default SkPixelSerializer (patchset #1 id:1 of https://codereview.chromium.org/1507123002/ )
Reason for revert:
Breaking DEPS roll (linker error)

Original issue's description:
> default SkPixelSerializer
>
> Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.
>
> Add SkImageEncoder::CreatePixelSerializer() to return a
> PixelSerializer that calls into SkImageEncoder::EncodeData.
>
> SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.
>
> Committed: https://skia.googlesource.com/skia/+/b0bd1516bff3f5afcbfd615e805867531657811b

TBR=scroggo@google.com,halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1505203003
2015-12-08 10:59:13 -08:00
halcanary
b0bd1516bf default SkPixelSerializer
Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.

Add SkImageEncoder::CreatePixelSerializer() to return a
PixelSerializer that calls into SkImageEncoder::EncodeData.

SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.

Review URL: https://codereview.chromium.org/1507123002
2015-12-08 10:29:58 -08:00
reed
c9e190ddac Revert of change pixel-serializer to support reencoding existing data (patchset #5 id:80001 of https://codereview.chromium.org/1373683003/ )
Reason for revert:
Need to somehow get access to encoders in chrome -- link error on the roll since SkImageEncoder is not built as part of chrome.

Original issue's description:
> change pixel-serializer to support reencoding existing data
>
> Trying to evolve this interface so it can
> - support rich set of backend-encoders (including ones like ETC1 that can cheaply convert to KXT
> - allow for encoding images as well as bitmaps (e.g. for picture serialization)
> - perhaps replace SkImageEncoder as an API (assuming we create a factory that returns a serializer given a format)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/13f48dc85aa68a60da66aaf39c93d527d11d1278

TBR=scroggo@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1371983003
2015-09-28 09:58:41 -07:00
reed
13f48dc85a change pixel-serializer to support reencoding existing data
Trying to evolve this interface so it can
- support rich set of backend-encoders (including ones like ETC1 that can cheaply convert to KXT
- allow for encoding images as well as bitmaps (e.g. for picture serialization)
- perhaps replace SkImageEncoder as an API (assuming we create a factory that returns a serializer given a format)

BUG=skia:

Review URL: https://codereview.chromium.org/1373683003
2015-09-28 08:58:53 -07:00
halcanary
385fe4d4b6 Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
2015-08-26 13:07:49 -07:00
scroggo
1dd3ea9d45 Add SkEncodedFormat, used by SkCodec.
Needed by Android to determine the format.

Review URL: https://codereview.chromium.org/1018953003
2015-03-20 11:55:55 -07:00
reed
53b9e2e0f2 add const to encodePixels pixel parameter
BUG=skia:

Review URL: https://codereview.chromium.org/788143007
2014-12-19 12:26:07 -08:00
caryclark
936b73424f ios fixes
skia_ios.mm
Get the app's Documents directory and pass use it to set the resource path.
This is a quick hack which will be replaced by a new application that is
a tiny shim around a command line tool.

SkImageEncoder.h
SkForceLinking.cpp
SkImageDecoder_CG.cpp
Add support for FORCE_LINKING so iOS sees the PNG encoder and others.

SkFloatBits.cpp
SkPoint.cpp
Handle denormalized numbers that are floored by the iOS ARM processor.

SkImageDecoder_iOS.mm
Remove empty encoder factory.

SkTouchGesture.cpp
Return early on empty state on touch rather than aborting (crashing)

JpegTest.cpp
Hal via stackoverflow.com says partial jpegs can be gray as well.

skia_test.cpp
Remove crash handler call for now to avoid link failure.

OverwriteLine.h
Remove fancy line overwrite for iOS.

Resources.cpp
Add interface to set resource directory based on runtime query.

BUG=skia:2736 skia:2737 skia:2738
R=reed@google.com, halcanary@google.com, mtklein@google.com, tfarina@chromium.org

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/373383003
2014-07-11 12:14:51 -07:00
krajcevski
c250d2e4ab Initial KTX encoder
The encoder comes with tests to check that the encoding/decoding
operations between ETC encoded bitmaps and ARGB bitmaps are sane.

R=bsalomon@google.com, robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/312353003
2014-06-06 06:16:28 -07:00
mtklein@google.com
bd6343b1d6 Rewrite SkTRegistry to take any trivially-copyable type.
Obviously these are all currently function pointers of type T(*)(P) for various
T and P.  In bench refactoring, I'm trying to register a function pointer of
type T(*)(), which can't be done as is (passing P=void doesn't work).  This
also lets us register things like primitives, which is conceivable useful.

BUG=
R=reed@google.com, scroggo@google.com

Review URL: https://codereview.chromium.org/23453031

git-svn-id: http://skia.googlecode.com/svn/trunk@11082 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-04 17:20:18 +00:00
scroggo@google.com
7def5e1630 Separate core and images project.
SkImage calls functions on SkImageDecoder and SkImageEncoder. This
is desired behavior, and it is also desired to include SkImage as
a part of core. In order to keep core from depending on images,
update SkImageDecoder_empty.cpp to implement all of SkImageDecoder
and SkImageEncoder. This file will be built by chrome (in
https://codereview.chromium.org/15960015).

Move force_linking from SkImageDecoder.cpp to its own file. It must
be called to force linking with the image decoders if desired. Call
the function in tools that need it:
sk_image
render_pictures
render_pdfs
sk_hello
filter
bench_pictures
debugger

SkImageDecoder:
Derive from SkNoncopyable, instead of duplicating its
hiding of constructors.

skhello:
Return rather than trying to write a null SkData to the stream.

Revert "Hamfistedly removed core dependence on images"
(commit 0f05f682a90bc125323677abf3476e1027d174f5) and
"Move SkImage::encode to SkImage_Codec.cpp."
(commit 83e47a954d0bf65439f3d9c0c93213063dd70da3.)
These two commits were temporary fixes that this change
cleans up.

SkSnapshot.cpp:
Check for a NULL encoder returned by SkImageEncoder::Create.

BUG=https://code.google.com/p/skia/issues/detail?id=1275
R=djsollen@google.com, robertphillips@google.com

Review URL: https://codereview.chromium.org/15806010

git-svn-id: http://skia.googlecode.com/svn/trunk@9364 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 14:00:10 +00:00