History log of /external/skia/src/core/SkWriteBuffer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e8eed323ef7ea1c3c7057d49f3306b8ff41676e8 22-Nov-2016 Hal Canary <halcanary@google.com> remove SkPixelRef::refEncodedData()

BUG=skia:

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

Change-Id: I15dba4f44c762ab69a23eb8a77adff5f63763e30
Reviewed-on: https://skia-review.googlesource.com/5001
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/src/core/SkWriteBuffer.cpp
6bd5284415bd983b0628c4941dff5def40018f5a 27-Oct-2016 bungeman <bungeman@google.com> Remove SkAutoTUnref and SkAutoTDelete from public includes.

This also makes the required changed to src, tests, and tools. The few
public APIs modified by this change appear to be unused outside of Skia.

Removing these from the public API makes it easier to ensure users are
no longer using them.

This also updates GrGpu::wrapBackendXXX and the
::onWrapBackendXXX methods to clarify ownership.

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

Review-Url: https://codereview.chromium.org/2448593002
/external/skia/src/core/SkWriteBuffer.cpp
97bbf8211fa35bbb0811d5835cb0eaaf37cc679e 25-Sep-2016 brianosman <brianosman@google.com> Add SkColor4f serialization

Adjusted usage in color shader, and will also be using this
in gradients, soon.

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

Review-Url: https://codereview.chromium.org/2334123003
/external/skia/src/core/SkWriteBuffer.cpp
54dc4878b02765efea39e68b218df1e4bfff4b88 13-Sep-2016 reed <reed@google.com> add pipecanvas

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

Review-Url: https://codereview.chromium.org/2201323003
/external/skia/src/core/SkWriteBuffer.cpp
ffae30db4ade45b469ac3432ec373b6f6daee6e7 03-Aug-2016 bungeman <bungeman@google.com> Convert SkAutoTUnref<SkData> to sk_sp<SkData>.

With the move from SkData::NewXXX to SkData::MakeXXX most
SkAutoTUnref<SkData> were changed to sk_sp<SkData>. However,
there are still a few SkAutoTUnref<SkData> around, so clean
them up.

Review-Url: https://codereview.chromium.org/2212493002
/external/skia/src/core/SkWriteBuffer.cpp
38d909ec2875f79952de08f36adfaac5680d2c53 02-Aug-2016 bungeman <bungeman@google.com> Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.

This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004

Review-Url: https://codereview.chromium.org/2206633004
/external/skia/src/core/SkWriteBuffer.cpp
96e4e1ca5a7dbe08b396817da30adfa3ecfd438c 09-Jun-2016 mtklein <mtklein@chromium.org> Add raw pixel serialization fallback for SkImages that cannot be encoded.

This fixes serialize-8888 for 2 GMs on Mac that I'm now unblacklisting.
I think another was already fixed, and two more were Windows-only.

Seems safe to use encoded_size=1 as another sentinel here (like we already
use =0); I can't imagine any encoded image format that can encode an image
in a single byte.

I suspect this is the root of the referenced bug too,
but this is a good idea even if not.

BUG=chromium:601851
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2039813007

CQ_EXTRA_TRYBOTS=client.skia:Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Release-Trybot,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-Trybot;client.skia.android:Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release-Trybot,Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Release-Trybot

Review-Url: https://codereview.chromium.org/2039813007
/external/skia/src/core/SkWriteBuffer.cpp
fad98562d8f9db63839a8d902a301b174320f27f 04-May-2016 brianosman <brianosman@google.com> Prototype code that turns any/every flattenable into JSON

This makes inspecting things in SkDebugger far more useful - any filter
or other complex object on the paint is ultimately visible. You still
have to do some guess work to figure out what the fields actually mean,
but you can at least cross-reference with the code in flatten().

Screenshots:
Before: https://screenshot.googleplex.com/a6JM5HBBe6G.png
After : https://screenshot.googleplex.com/XQfr4YJ6mnH.png

Changes to public API are just removals and changes to make
some functions virtual.

TBR=reed@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1920423002

Review-Url: https://codereview.chromium.org/1920423002
/external/skia/src/core/SkWriteBuffer.cpp
444f1ba1b7fcca7eca9fda839ca6b613ff31135e 03-May-2016 brianosman <brianosman@google.com> Remove SkBitmapHeap and SkBitmapHeapReader. They're unused.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1938033002

Review-Url: https://codereview.chromium.org/1938033002
/external/skia/src/core/SkWriteBuffer.cpp
57b46159740020ef904aaf41e9e5ae07106591cc 02-May-2016 brianosman <brianosman@google.com> Remove unused encodedString API on SkWriteBuffer/SkReadBuffer

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1936103002

Review-Url: https://codereview.chromium.org/1936103002
/external/skia/src/core/SkWriteBuffer.cpp
b4c899d48d4c5d8e867beb611551f7b55ec60abb 29-Apr-2016 mtklein <mtklein@chromium.org> remove SkWriteBuffer::getWriter32().

SkWriteBuffer exposes its lower-level implementation SkWriter32 through
this one call. It's not currently used in any interesting way:
- write_encoded_bitmap() uses it to manually re-create writeDataAsByteArray();
- unit tests use it incidentally as a quick way to read the serialized bytes.

This should be SkWriteBuffer no longer necessarily needs to have an SkWriter32.

Landing this will let us then remove SkWriter32::contiguousArray().

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1936563002

TBR=reed@google.com
Just deleting API

Review-Url: https://codereview.chromium.org/1936563002
/external/skia/src/core/SkWriteBuffer.cpp
a3b3b238f507a6ec7f43febc6bf0bb17e04e770f 22-Apr-2016 msarett <msarett@google.com> Enable flattening/unflattening with custom unflatten procs

Now flattenables are serialized using a string name, so that
flattenables do not necessarily need to be registered before
serialization. They just need to override getTypeName().

Allows custom unflatten procs to be set on the SkReadBuffer.
This is optional if the flattenable is registered, but otherwise
must be called.

This was split off from:
https://codereview.chromium.org/1837913003/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1858323002

Review URL: https://codereview.chromium.org/1858323002
/external/skia/src/core/SkWriteBuffer.cpp
be991efbd9fe62a26a652b5ec8b8c98eb0fc6591 19-Apr-2016 msarett <msarett@google.com> Delete unused fNamedFactorySet from SkWriteBuffer

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1903483002

Review URL: https://codereview.chromium.org/1903483002
/external/skia/src/core/SkWriteBuffer.cpp
6c71e0a065c2eb32139682bb1ca1cbbeb02ebcb9 07-Apr-2016 benjaminwagner <benjaminwagner@google.com> Reverse dependency between SkScalar.h and SkFixed.h.

The following are unused in Chromium, Android, Mozilla, and Google3:
- SkFixedToScalar
- SkScalarToFixed

The following are additionally unused in Skia:
- SkStrAppendFixed
- SkWriteBuffer::writeFixed

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1841123002

Review URL: https://codereview.chromium.org/1841123002
/external/skia/src/core/SkWriteBuffer.cpp
9d524f22bfde5dc3dc8f48e1be39bdebd3bb0304 29-Mar-2016 halcanary <halcanary@google.com> Style bikeshed - remove extraneous whitespace

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002

Review URL: https://codereview.chromium.org/1842753002
/external/skia/src/core/SkWriteBuffer.cpp
6b28017781b47ebd9c9c3f3a52561f05702d5e8a 07-Dec-2015 halcanary <halcanary@google.com> SkPixelSerializer: support indexed pixels

By taking a SkPixmap, SkPixelSerializer::encode() can now handle colortables.

Review URL: https://codereview.chromium.org/1501303002
/external/skia/src/core/SkWriteBuffer.cpp
c9e190ddac3d193e89e580ea3819a55c28f15e61 28-Sep-2015 reed <reed@google.com> 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
/external/skia/src/core/SkWriteBuffer.cpp
13f48dc85aa68a60da66aaf39c93d527d11d1278 28-Sep-2015 reed <reed@google.com> 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
/external/skia/src/core/SkWriteBuffer.cpp
c3470340b6658dea7baa3ac90d3b716c0afd7051 04-Sep-2015 fmalita <fmalita@chromium.org> Handle zero-length encoded images gracefully during deserialization

Image encoding may fail during serialization, resulting in zero-length
encoded data in the SKP.

Instead of invalidating the stream (and preventing deserialization of
the whole picture) we can instantiate placeholder images.

BUG=skia:4285
R=reed@google.com,robertphillips@google.com

Review URL: https://codereview.chromium.org/1308273011
/external/skia/src/core/SkWriteBuffer.cpp
2be7125f3274a4b661f50e992fc0eb3c14c24f05 03-Sep-2015 fmalita <fmalita@chromium.org> Add a SkPixelSerializer SkImage encode variant

R=reed@google.com
BUG=skia:4285

Review URL: https://codereview.chromium.org/1310633006
/external/skia/src/core/SkWriteBuffer.cpp
96fcdcc219d2a0d3579719b84b28bede76efba64 27-Aug-2015 halcanary <halcanary@google.com> Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
/external/skia/src/core/SkWriteBuffer.cpp
871872f3f247f6b699617f6d9ef50ef5da6fbe74 22-Jun-2015 reed <reed@google.com> change old picture serialization to really handle images

BUG=skia:3965

Review URL: https://codereview.chromium.org/1199473002
/external/skia/src/core/SkWriteBuffer.cpp
92fc2ae58331662ec411a048686cb4801e0a909a 22-May-2015 reed <reed@google.com> add SkPixmap and external locking to bitmaps

BUG=skia:

Review URL: https://codereview.chromium.org/1074983003
/external/skia/src/core/SkWriteBuffer.cpp
895c43b28b27bb3124db3d32efd0c7219eb4a3cb 11-Dec-2014 scroggo <scroggo@google.com> Replace EncodeBitmap with an interface.

Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().

Provides an implementation that supports the old version of
SkPicture::serialize().

TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely

BUG=skia:3190

Review URL: https://codereview.chromium.org/784643002
/external/skia/src/core/SkWriteBuffer.cpp
303044579913eacc177d4b28a674121725c565bb 09-Dec-2014 scroggo <scroggo@google.com> Revert of Replace EncodeBitmap with an interface. (patchset #12 id:210001 of https://codereview.chromium.org/784643002/)

Reason for revert:
Failing serialization tasks in DM:

http://build.chromium.org/p/client.skia/builders/Test-Win8-ShuttleA-GTX660-x86-Debug/builds/352/steps/dm/logs/stdio

Original issue's description:
> Replace EncodeBitmap with an interface.
>
> Gives more flexibility to the caller to decide whether to use the
> encoded data returned by refEncodedData().
>
> Provides an implementation that supports the old version of
> SkPicture::serialize().
>
> TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
>
> BUG=skia:3190
>
> Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1
>
> Committed: https://skia.googlesource.com/skia/+/02b217f80b01a7dda8493422e5257c36a9ce8464

TBR=reed@google.com,rmistry@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:3190

Review URL: https://codereview.chromium.org/783393004
/external/skia/src/core/SkWriteBuffer.cpp
02b217f80b01a7dda8493422e5257c36a9ce8464 09-Dec-2014 scroggo <scroggo@google.com> Replace EncodeBitmap with an interface.

Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().

Provides an implementation that supports the old version of
SkPicture::serialize().

TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely

BUG=skia:3190

Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1

Review URL: https://codereview.chromium.org/784643002
/external/skia/src/core/SkWriteBuffer.cpp
c0708cb7bcc22a6ad14fc3c2198d8e00d71c6754 09-Dec-2014 robertphillips <robertphillips@google.com> Revert of Replace EncodeBitmap with an interface. (patchset #11 id:190001 of https://codereview.chromium.org/784643002/)

Reason for revert:
Compilation is failing on some bots

Original issue's description:
> Replace EncodeBitmap with an interface.
>
> Gives more flexibility to the caller to decide whether to use the
> encoded data returned by refEncodedData().
>
> Provides an implementation that supports the old version of
> SkPicture::serialize().
>
> TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
>
> BUG=skia:3190
>
> Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1

TBR=reed@google.com,scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:3190

Review URL: https://codereview.chromium.org/787833002
/external/skia/src/core/SkWriteBuffer.cpp
0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1 09-Dec-2014 scroggo <scroggo@google.com> Replace EncodeBitmap with an interface.

Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().

Provides an implementation that supports the old version of
SkPicture::serialize().

TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely

BUG=skia:3190

Review URL: https://codereview.chromium.org/784643002
/external/skia/src/core/SkWriteBuffer.cpp
0b17d6cb343cb71a3f548a02f0952c3592fc8c87 13-Nov-2014 djsollen <djsollen@google.com> Cleanup public includes directory.

This CL updates various files in the includes directory to ensure that (1) they do
not depend on headers in /src and (2) that they minimize their dependence on external
headers.

To ensure that we don't regress this behavior a new build target has been added to
build a single cpp file that contains all* public includes and is compiled with
only those directories in the include path.

* The exception is those includes that depend on OS specific headers

BUG=skia:2941
NOTRY=true

Review URL: https://codereview.chromium.org/721903002
/external/skia/src/core/SkWriteBuffer.cpp
968edcafa61442dc4f7f8ed8f89523d0f353e9fb 23-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> stop calling SkBitmap::flatten

BUG=skia:
R=scroggo@google.com, halcanary@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14867 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkWriteBuffer.cpp
210a6aa8bd0c8031b2990caaa956b0ed5ce275ed 07-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> getFactory() must return a factory.

BUG=348821
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13702 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkWriteBuffer.cpp
536ac5e20c2ec2008993c0677ba8cbc5ae0f34cf 11-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Templetized SkWriter32 readTAt() & overwriteTAt()

Convert SkWriter32::{read,write}32At() to ::{read,overwrite}TAt<>() to allow
peeking/updating arbitrary records.


BUG=skia:
R=mtklein@google.com, reed@google.com, robertphillips@google.com, iancottrell@chromium.org

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13416 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkWriteBuffer.cpp
6fcd28ba1de83b72f4c8343ccec27d26c127de32 04-Feb-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> fix samplefuzz, fix some 32/64bit warnings

git-svn-id: http://skia.googlecode.com/svn/trunk@13303 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkWriteBuffer.cpp
c6d3c444ca76feba5a8937dbc80626ade5347275 31-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Have peek32 return uint32_t& to make it harder to look at more than 4 bytes.

BUG=skia:
R=reed@google.com, robertphillips@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13265 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkWriteBuffer.cpp
a2bd2d12ad9504583e9311404fcd82b40df49d30 30-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Set write buffer flags only in SkWriteBuffer and SkFlatController constructors.

This is a baby step toward refactored (and faster in-process) typeface and flattenable factory encoding and decoding. The sooner SkWriteBuffer knows its flags, the better.

Next steps will be to rearrange Sk{Read,Write}Buffer members into disjoint strategies to handle typefaces and flattenable factories: one for in-process, one for cross-process, one when validating.

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

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13253 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkWriteBuffer.cpp
8b0e8ac5f582de80356019406e2975079bf0829d 30-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Refactor read and write buffers.

Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer
a step each in the hierarchy.

What used to be this:

SkFlattenableWriteBuffer -> SkOrderedWriteBuffer
SkFlattenableReadBuffer -> SkOrderedReadBuffer
SkFlattenableReadBuffer -> SkValidatingReadBuffer

is now

SkWriteBuffer
SkReadBuffer -> SkValidatingReadBuffer

Benefits:
- code is simpler, names are less wordy
- the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed
- write buffers are completely devirtualized, important for record speed

This refactoring was mostly mechanical. You aren't going to find anything
interesting in files with less than 10 lines changed.

BUG=skia:
R=reed@google.com, scroggo@google.com, djsollen@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13245 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkWriteBuffer.cpp