History log of /external/skia/include/core/SkFlattenable.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
12c4fc2579017a162668db077e8067512fd968ca 27-Jun-2016 dvonbeck <dvonbeck@google.com> SkLightingShader normal vector CPU computation refactor.

The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.

This CL's base was the CL for GPU handling: https://codereview.chromium.org/2043393002/

What this CL includes:

- A refactor of the SkLightingShader context's code that deals with reading normals off of a normal map. This is now abstracted out into a NormalSource::Provider class that the context uses.

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

Committed: https://skia.googlesource.com/skia/+/790a70118327a129cb6b48fabe80f4e184c1e67c
Review-Url: https://codereview.chromium.org/2050773002
/external/skia/include/core/SkFlattenable.h
2c80711f90a5dafe3b726bc6562b1e769702c34b 27-Jun-2016 dvonbeck <dvonbeck@google.com> Revert of Refactoring of CPU NormalMap handling out into its own class (patchset #13 id:240001 of https://codereview.chromium.org/2050773002/ )

Reason for revert:
GMs are crashing on Windows Test trybots

Original issue's description:
> SkLightingShader normal vector CPU computation refactor.
>
> The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.
>
> This CL's base was the CL for GPU handling: https://codereview.chromium.org/2043393002/
>
> What this CL includes:
>
> - A refactor of the SkLightingShader context's code that deals with reading normals off of a normal map. This is now abstracted out into a NormalSource::Provider class that the context uses.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2050773002
>
> Committed: https://skia.googlesource.com/skia/+/790a70118327a129cb6b48fabe80f4e184c1e67c

TBR=egdaniel@google.com,reed@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/2101653002
/external/skia/include/core/SkFlattenable.h
790a70118327a129cb6b48fabe80f4e184c1e67c 27-Jun-2016 dvonbeck <dvonbeck@google.com> SkLightingShader normal vector CPU computation refactor.

The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.

This CL's base was the CL for GPU handling: https://codereview.chromium.org/2043393002/

What this CL includes:

- A refactor of the SkLightingShader context's code that deals with reading normals off of a normal map. This is now abstracted out into a NormalSource::Provider class that the context uses.

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

Review-Url: https://codereview.chromium.org/2050773002
/external/skia/include/core/SkFlattenable.h
8811e40850ac3310c17fe8cdaffe72817a5e317d 16-Jun-2016 dvonbeck <dvonbeck@google.com> Refactoring of GPU NormalMap handling out into its own class.

The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.

What this CL includes:

- Created a new 'NormalMapFP', out of the existing normal map reading behavior in LightingFP.

- Encapsulates this new fragment processor on a new class NormalMapSource.

- Created a NormalSource abstraction that will interface with SkLightingShader.

- Adapted SkLightingShader to use the normals from its NormalSource field ON THE GPU SIDE. No changes done to the CPU side yet.

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

Committed: https://skia.googlesource.com/skia/+/87b0dd00cf9409c5fc990f5d0bb7c0df837f08da
Committed: https://skia.googlesource.com/skia/+/a7d1e2a57aef2aa4913d4380646d60bbab761318
Review-Url: https://codereview.chromium.org/2043393002
/external/skia/include/core/SkFlattenable.h
4132de7069b0088665af52ffea3a42b055f51b79 15-Jun-2016 egdaniel <egdaniel@google.com> Revert of Refactoring of GPU NormalMap handling out into its own class (patchset #9 id:160001 of https://codereview.chromium.org/2043393002/ )

Reason for revert:
break deps roll

Original issue's description:
> Refactoring of GPU NormalMap handling out into its own class.
>
> The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.
>
> What this CL includes:
>
> - Created a new 'NormalMapFP', out of the existing normal map reading behavior in LightingFP.
>
> - Encapsulates this new fragment processor on a new class NormalMapSource.
>
> - Created a NormalSource abstraction that will interface with SkLightingShader.
>
> - Adapted SkLightingShader to use the normals from its NormalSource field ON THE GPU SIDE. No changes done to the CPU side yet.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2043393002
>
> Committed: https://skia.googlesource.com/skia/+/87b0dd00cf9409c5fc990f5d0bb7c0df837f08da
> Committed: https://skia.googlesource.com/skia/+/a7d1e2a57aef2aa4913d4380646d60bbab761318

TBR=reed@google.com,dvonbeck@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/2068983005
/external/skia/include/core/SkFlattenable.h
a7d1e2a57aef2aa4913d4380646d60bbab761318 15-Jun-2016 dvonbeck <dvonbeck@google.com> Refactoring of GPU NormalMap handling out into its own class.

The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.

What this CL includes:

- Created a new 'NormalMapFP', out of the existing normal map reading behavior in LightingFP.

- Encapsulates this new fragment processor on a new class NormalMapSource.

- Created a NormalSource abstraction that will interface with SkLightingShader.

- Adapted SkLightingShader to use the normals from its NormalSource field ON THE GPU SIDE. No changes done to the CPU side yet.

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

Committed: https://skia.googlesource.com/skia/+/87b0dd00cf9409c5fc990f5d0bb7c0df837f08da
Review-Url: https://codereview.chromium.org/2043393002
/external/skia/include/core/SkFlattenable.h
da743935fa0aba854a96654a474454b09e5488e8 15-Jun-2016 egdaniel <egdaniel@google.com> Revert of Refactoring of GPU NormalMap handling out into its own class (patchset #7 id:120001 of https://codereview.chromium.org/2043393002/ )

Reason for revert:
Breaking build and deps roll. Need to move include of SkBitmapProcShader in SkLightingShader.cpp from gpu include list to general list.

Original issue's description:
> Refactoring of GPU NormalMap handling out into its own class.
>
> The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.
>
> What this CL includes:
>
> - Created a new 'NormalMapFP', out of the existing normal map reading behavior in LightingFP.
>
> - Encapsulates this new fragment processor on a new class NormalMapSource.
>
> - Created a NormalSource abstraction that will interface with SkLightingShader.
>
> - Adapted SkLightingShader to use the normals from its NormalSource field ON THE GPU SIDE. No changes done to the CPU side yet.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2043393002
>
> Committed: https://skia.googlesource.com/skia/+/87b0dd00cf9409c5fc990f5d0bb7c0df837f08da

TBR=reed@google.com,dvonbeck@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/2062133004
/external/skia/include/core/SkFlattenable.h
87b0dd00cf9409c5fc990f5d0bb7c0df837f08da 14-Jun-2016 dvonbeck <dvonbeck@google.com> Refactoring of GPU NormalMap handling out into its own class.

The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.

What this CL includes:

- Created a new 'NormalMapFP', out of the existing normal map reading behavior in LightingFP.

- Encapsulates this new fragment processor on a new class NormalMapSource.

- Created a NormalSource abstraction that will interface with SkLightingShader.

- Adapted SkLightingShader to use the normals from its NormalSource field ON THE GPU SIDE. No changes done to the CPU side yet.

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

Review-Url: https://codereview.chromium.org/2043393002
/external/skia/include/core/SkFlattenable.h
edf7fcd8b9e339800edb61ae422f8b6c1b77c3e8 25-Apr-2016 msarett <msarett@google.com> Make SkDrawable an SkFlattenable

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

Review URL: https://codereview.chromium.org/1911403004
/external/skia/include/core/SkFlattenable.h
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/include/core/SkFlattenable.h
3b37545bc594a96de45eba62dea0ce478750f2a9 04-Apr-2016 mtklein <mtklein@google.com> Revert of Delete SkFlattenable::Type (patchset #2 id:20001 of https://codereview.chromium.org/1834303003/ )

Reason for revert:
Used by Chrome.

c:\b\build\slave\workdir\build\src\cc\playback\compositing_display_item.cc(53): error C2039: 'GetFlattenableType': is not a member of 'SkColorFilter'
c:\b\build\slave\workdir\build\src\third_party\skia\include\core\skshader.h(19): note: see declaration of 'SkColorFilter'
c:\b\build\slave\workdir\build\src\cc\playback\compositing_display_item.cc(53): error C3861: 'GetFlattenableType': identifier not found

Original issue's description:
> Delete SkFlattenable::Type
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1834303003
>
> Committed: https://skia.googlesource.com/skia/+/99d9231f6a4cb6b85b8637e9d8ae32f8bd7c466f

TBR=reed@google.com,msarett@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/1853383002
/external/skia/include/core/SkFlattenable.h
99d9231f6a4cb6b85b8637e9d8ae32f8bd7c466f 04-Apr-2016 msarett <msarett@google.com> Delete SkFlattenable::Type

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

Review URL: https://codereview.chromium.org/1834303003
/external/skia/include/core/SkFlattenable.h
60c9b58b3214b0154c931656e91e39b230e987d8 03-Apr-2016 reed <reed@google.com> change flattenable factory to return sk_sp

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

Review URL: https://codereview.chromium.org/1855733002
/external/skia/include/core/SkFlattenable.h
6054d686e6fecc7261eeb328f27e9e16cd1d3b1e 13-Jan-2016 reed <reed@google.com> reorg global initialization, separating core from optional

Chrome will be changed to just inherit our files, with no need to have their own copy. see https://codereview.chromium.org/1581533007/

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

Review URL: https://codereview.chromium.org/1580873002
/external/skia/include/core/SkFlattenable.h
00d6e515e5835f7df6163ceb5f5ceb1770552bf7 25-Sep-2015 mdempsky <mdempsky@chromium.org> Eliminate some clutter in SkFlattenable

The Registrar class is unnecessary, as SkFlattenable factory
registration is now handled via initialization routines that can just
call the Register function directly.

Also, no need to lazily initialize gCount to 0, as initializing an int
to a constant value does not require dynamic initialization. (C++
actually guarantees zero initialization of global ints anyway, but
existing practice in Skia appears to favor the explicit "= 0").

Relatedly, this requires removing the unused/unimplemented
SkLayerDrawLooper::MyRegistrar class. And removing that allows Clang
to realize that SkLayerDrawLooper::fTopRec is unneeded too, so remove
that too to squelch the compiler warning/error.

This doesn't change any public API.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1361323002
/external/skia/include/core/SkFlattenable.h
ab374cf894f136418ad573dfb5da4fcb48f47db0 24-Aug-2015 mtklein <mtklein@chromium.org> Explicitly friend ::SkPrivateEffectInitializer to flattenables.

Looks like the -Wmicrosoft warnings in the bug are coming up specificically
because many the effects in SkLightingImageFilter are defined inside an
anonymous namespace (spanning, I think, lines 33-702 today).

BUG=skia:4091

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1311783004
/external/skia/include/core/SkFlattenable.h
2766c00fc0b6a07d46e5f74cdad45da2ef625237 26-Jun-2015 mtklein <mtklein@chromium.org> remove SkInstCnt

It's been outclassed by Valgrind and leak sanitizer,
and it seems to be causing problems for external folks building Skia.

I'm not sure why our own builds seem unaffected.

Latest thread:
https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0

BUG=skia:

Review URL: https://codereview.chromium.org/1217573002
/external/skia/include/core/SkFlattenable.h
36352bf5e38f45a70ee4f4fc132a38048d38206d 26-Mar-2015 mtklein <mtklein@chromium.org> C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}

NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
/external/skia/include/core/SkFlattenable.h
72c9faab45124e08c85f70ca38536914862d947c 09-Jan-2015 mtklein <mtklein@chromium.org> Fix up all the easy virtual ... SK_OVERRIDE cases.

This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases. We'll have to manually clean up the rest
over time unless I level up in regexes.

for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end

BUG=skia:

Review URL: https://codereview.chromium.org/806653007
/external/skia/include/core/SkFlattenable.h
7e44bb191633e225fd0455c267dbf67f9ee8633e 07-Jan-2015 mtklein <mtklein@chromium.org> Remove macros that make it look like it's a good idea to not be able to flatten.

There are only a handful of SkFlattenables that are not flattenable. That
there are any seems highly illogical. To make this look less like a normal
thing, this removes both macros that marked SkFlattenables as non-flattenable
(in slightly different ways).

The handful of SkFlattenables in our codebase that can't be flattened now
assert violently that they can't be flattened. They're internal or
part of animator... places where we'll never actually flatten them.

TestLooper and DummyRasterizer were so trivial that I just made them flattenable.

BUG=skia:

Review URL: https://codereview.chromium.org/841753002
/external/skia/include/core/SkFlattenable.h
3f3b3d003527861dc0bd89733857576408906431 01-Dec-2014 mtklein <mtklein@chromium.org> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.

This was needed for pictures before v33, and we're now requiring v35+.

Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88

Review URL: https://codereview.chromium.org/769953002
/external/skia/include/core/SkFlattenable.h
6e78293ee896020104ffc4c23b565073e9a49893 01-Dec-2014 mtklein <mtklein@google.com> Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (patchset #1 id:1 of https://codereview.chromium.org/769953002/)

Reason for revert:
Breaks canary builds. Will reland after the Chromium change lands.

Original issue's description:
> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.
>
> This was needed for pictures before v33, and we're now requiring v35+.
>
> Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88

TBR=reed@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/768183002
/external/skia/include/core/SkFlattenable.h
52c293547b973f7fb5de3c83f5062b07d759ab88 01-Dec-2014 mtklein <mtklein@chromium.org> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.

This was needed for pictures before v33, and we're now requiring v35+.

Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc

BUG=skia:

Review URL: https://codereview.chromium.org/769953002
/external/skia/include/core/SkFlattenable.h
9fa60daad4d5f54c0dbe3dbcc7608a8f6d721187 21-Aug-2014 reed <reed@google.com> Simplify flattening to just write enough to call the factory/public-constructor for the class. We want to *not* rely on private constructors, and not rely on calling through the inheritance hierarchy for either flattening or unflattening(CreateProc).

Refactoring pattern:

1. guard the existing constructor(readbuffer) with the legacy build-flag
2. If you are a instancable subclass, implement CreateProc(readbuffer) to create a new instances from the buffer params (or return NULL).

If you're a shader subclass
1. You must read/write the local matrix if your class accepts that in its factory/constructor, else ignore it.

R=robertphillips@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org, sugoi@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/395603002
/external/skia/include/core/SkFlattenable.h
83f23d87f1d67e6e73873e1ef7cda621c43703a0 22-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove unused (by clients) SkUnitMapper

This reverts commit 874423a81b5bc2541c7397e6ab00d5e7c9fdaf98.

TBR=scroggo

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14842 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
3339ac54a5ed75f2872ab16e9052a8b9ff3564bf 22-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/) (https://codereview.chromium.org/288343009/)

Reason for revert:
required blink change failed to land

Original issue's description:
> Remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/)
>
> This reverts commit dd50c83b5b34dab3a077741861b50ed1f2bc6b8f.
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14830

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

Author: reed@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14838 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
4b8f8022550daa7458ed3de207d1300917d4a8cb 21-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/)

This reverts commit dd50c83b5b34dab3a077741861b50ed1f2bc6b8f.

BUG=skia:
R=scroggo@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14830 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
e2b193ca5c76f01f8e12b4a92e9bd6ccb3ed4280 16-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/)

Reason for revert:
does not address all legacy callsites in chrome.

e.g.

[13:45:32.091872] ../../ui/native_theme/native_theme_base.cc:608:76: error: no matching function for call to ‘SkGradientShader::CreateLinear(SkPoint [3], SkColor [3], NULL, int, SkShader::TileMode, NULL)’
[13:45:32.091919] gradient_bounds, colors, NULL, 3, SkShader::kClamp_TileMode, NULL));


Original issue's description:
> remove unused (by clients) SkUnitMapper
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14761

R=robertphillips@google.com, scroggo@google.com, george@mozilla.com
TBR=george@mozilla.com, robertphillips@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14763 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
ee0cac336c6a3a357ae3cb18be8ef4b3cb5edddb 16-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> remove unused (by clients) SkUnitMapper

BUG=skia:
R=robertphillips@google.com, scroggo@google.com, george@mozilla.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14761 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
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/include/core/SkFlattenable.h
c0b7e10c6a68f59e1653e6c18e6bc954b3c3f0cf 23-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Initial error handling code

I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure.

BUG=

Committed: http://code.google.com/p/skia/source/detail?r=11247

R=reed@google.com, scroggo@google.com, djsollen@google.com, sugoi@google.com, bsalomon@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11922 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
c2eae4795478ab134a2315b1a9ff2c5de1d049e4 21-Oct-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverting revert of r11862 (Constify SkFlattenable::getFactory()) or reverting r11871.



git-svn-id: http://skia.googlecode.com/svn/trunk@11876 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
b5e391025e9859937fd6b4b3f4b8204d0bb73859 20-Oct-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverted due to Chromium compilation failures. Please see:

https://codereview.chromium.org/30973002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11871 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
575604d4c294bc8679d9889f9e187d4bc057e401 18-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Constify SkFlattenable::getFactory().

This allows us to also constify the argument of
SkFlattenableWriteBuffer::writeFlattenable() - which I've recently found
myself const-casting for no apparent good reason.

R=bungeman@google.com, mtklein@google.com, reed@google.com

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11862 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
22d69f9973a7aa942b3ecb91931fbed4b52ecb98 19-Sep-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> I'm investigating how to make the IPC transfer a bit more secure on the
skia side by adding some safety checks. This cl is about brainstorming
and proposing possible solutions for type checking at different stages.

BUG=
R=senorblanco@google.com, sugoi@google.com, scroggo@google.com, reed@android.com, senorblanco@chromium.org, mtklein@google.com, reed@google.com

Author: sugoi@chromium.org

Review URL: https://chromiumcodereview.appspot.com/22799007

git-svn-id: http://skia.googlecode.com/svn/trunk@11395 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
a0c2bc24381fea063008f9c8823756eb020603b3 21-Sep-2012 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make flattenables no longer depend on global static initializers.

Instead, force all builds to call InitializeFlattenables.

Remove the make_debugger script, which was created to force
rebuilding without global static initializers so that all flattenables
would be linked. It is no longer necessary since all flattenables
will be linked thanks to InitializeFlattenables, which now can (and
must) be called when global static initializers are turned on.

BUG=https://code.google.com/p/skia/issues/detail?id=903
BUG=https://code.google.com/p/skia/issues/detail?id=902

Review URL: https://codereview.appspot.com/6548044

git-svn-id: http://skia.googlecode.com/svn/trunk@5642 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 23-Aug-2012 rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)

This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054

git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
227b516f233df5870d79d3f8dcbdaa02336b7356 12-Aug-2012 mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> refactor some subclasses in SkFlattenable.h into SkPtrRecorder.h, in preparation for
privatizing SkPtrRecorder.h



git-svn-id: http://skia.googlecode.com/svn/trunk@5046 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
c73dd5c6880739f26216f198c757028fd28df1a4 07-Aug-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Update SkFlattenable buffers to be more modular.

This CL is an effort to stage the conversion to named
parameters for all SkFlattenable commands. This particular
stage only does the following two things...

1. Move flattenable buffers from SkFlattenable.h into
their own header.
2. Update and Add new read write methods for better clarity
and convenience.

BUG=

Review URL: https://codereview.appspot.com/6448095

git-svn-id: http://skia.googlecode.com/svn/trunk@4980 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
0c3e5fe728ce4b8606819ee919a4b82f4d9efc85 01-Aug-2012 scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Pipe factory names independently from the flattenables using them.

Avoids an issue where a flattenable written twice might be written
differently (the first time the flat data may have a name, whereas
the second time it will have an index).

Also add a test which confirms that identical flattenables will have
the same SkFlatData representation.

BUG=https://code.google.com/p/skia/issues/detail?id=721
TEST=FlatDataTest.cpp

Review URL: https://codereview.appspot.com/6431057

git-svn-id: http://skia.googlecode.com/svn/trunk@4896 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
34342f6f5127122ecc32166dcffa7f3d2a45c387 25-Jun-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> export flags on the state of the world when a picture was serialized.
e.g. don't read/write functionptrs in that case (sizeof may be different for one)
Review URL: https://codereview.appspot.com/6331050

git-svn-id: http://skia.googlecode.com/svn/trunk@4318 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
15e9d3e66e161ce23df30bc13f8a0c87d196b463 21-Jun-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Expanded distribution of instance counting

http://codereview.appspot.com/6300114/



git-svn-id: http://skia.googlecode.com/svn/trunk@4291 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
4bdfb8c9d6482a56c7212034a6f73046227ed023 12-Jun-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Compiler complaints + some minor cleanup

http://codereview.appspot.com/6295070/



git-svn-id: http://skia.googlecode.com/svn/trunk@4238 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
64a0ec36555352ec31aa7c5a7630a5d042b010ba 12-Jun-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Move SkColorTable into its own header and reduce includes in SkFlattenable.h
Review URL: https://codereview.appspot.com/6299072

git-svn-id: http://skia.googlecode.com/svn/trunk@4236 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
4866cc0afb7571309d9fdecb221d919f663054c0 01-Jun-2012 junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Adding option to serialize mutable bitmaps in SkPicture

BUG=http://code.google.com/p/chromium/issues/detail?id=115654
REVIEW=http://codereview.appspot.com/6221066/



git-svn-id: http://skia.googlecode.com/svn/trunk@4130 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
1f90287df3129cb267422e482c52ebeca6a8990f 01-Jun-2012 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Punctuation cleanup to satisfy idiosyncracies of OpenBSD gcc 4.2.1.
Original patch by landry.breuil.

http://code.google.com/p/skia/issues/detail?id=626



git-svn-id: http://skia.googlecode.com/svn/trunk@4112 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
2b2ede3e713065e1bac461787b0aafb03eaf871f 12-Apr-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Decouple the SkFlattenable from SkReader32/SkWriter32.

The current impl for SkFlattenable read/write buffers is
that they extend from SkReader32 and SkWriter32, but that
dependency must be abstract if we are to add any other
serialization format.
Review URL: https://codereview.appspot.com/5999045

git-svn-id: http://skia.googlecode.com/svn/trunk@3654 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
54924243c1b65b3ee6d8fa064b50a9b1bb2a19a5 29-Mar-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Cleanup code related to SkFlattenable::flatten()

The following changes were made by this CL:

1. Make flatten() a protected method as callers should use
SkFlattenableWriteBuffer to flatten an object
2. Make flatten a const method (including subclasses)
3. Mark subclass implementation of flatten with SK_OVERRIDE
4. Ensure overridden flatten impls call their parent
5. Remove no-op implementations of flatten from subclasses

Additionally, if necessary the unflattening constructor was
also moved to the protected section of the subclasses
header if it was not already there.

git-svn-id: http://skia.googlecode.com/svn/trunk@3540 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
ba28d03e94dc221d6a803bf2a84a420b9159255c 26-Mar-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Create macro for registering classes for deserialization
Review URL: https://codereview.appspot.com/5909063

git-svn-id: http://skia.googlecode.com/svn/trunk@3494 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
a2ca41e3afdd8fad5e0e924dec029f33918e0a67 23-Mar-2012 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Cleanup Macros arround static initializers for SkFlattenable.

This CL also removes an unused debugging function from the class
Review URL: https://codereview.appspot.com/5890043

git-svn-id: http://skia.googlecode.com/svn/trunk@3483 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
9d0c6ecb8440e8e546881a4ff850eb6333f24541 20-Dec-2011 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> fix 'no static globals' for chromium

M include/core/SkFlattenable.h
M include/core/SkPixelRef.h
M src/core/SkGraphics.cpp



git-svn-id: http://skia.googlecode.com/svn/trunk@2908 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
d26147adbbdca85f07dff432025afee0c8614387 15-Dec-2011 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add optional manual global initialization

M include/effects/SkAvoidXfermode.h
M include/effects/SkDiscretePathEffect.h
M include/effects/Sk1DPathEffect.h
M include/effects/Sk2DPathEffect.h
M include/effects/SkBlurDrawLooper.h
M include/effects/SkPixelXorXfermode.h
M include/effects/SkDashPathEffect.h
M include/effects/SkColorMatrixFilter.h
M include/effects/SkEmbossMaskFilter.h
M include/effects/SkLayerDrawLooper.h
M include/effects/SkGroupShape.h
M include/effects/SkBlurImageFilter.h
M include/effects/SkRectShape.h
A include/effects/SkEffects.h
M include/effects/SkCornerPathEffect.h
M include/effects/SkGradientShader.h
M include/effects/SkBlurMaskFilter.h
M include/effects/SkLayerRasterizer.h
M include/core/SkMallocPixelRef.h
M include/core/SkFlattenable.h
M include/core/SkShape.h
M include/core/SkPixelRef.h
M include/core/SkGraphics.h
M include/core/SkPathEffect.h
M include/core/SkPostConfig.h
M include/core/SkXfermode.h
M include/core/SkColorFilter.h
M include/images/SkFlipPixelRef.h
M include/images/SkImageRef_GlobalPool.h
M src/effects/SkDashPathEffect.cpp
M src/effects/SkColorMatrixFilter.cpp
M src/effects/SkBlurImageFilter.cpp
M src/effects/SkGroupShape.cpp
M src/effects/SkCornerPathEffect.cpp
M src/effects/SkGradientShader.cpp
M src/effects/SkBlurMaskFilter.cpp
M src/effects/SkAvoidXfermode.cpp
M src/effects/Sk2DPathEffect.cpp
M src/effects/SkBlurDrawLooper.cpp
M src/effects/SkPixelXorXfermode.cpp
M src/effects/SkColorFilters.cpp
M src/effects/SkLayerDrawLooper.cpp
M src/effects/SkRectShape.cpp
A src/effects/SkEffects.cpp
M src/effects/SkLayerRasterizer.cpp
M src/effects/SkDiscretePathEffect.cpp
M src/effects/Sk1DPathEffect.cpp
A src/effects/SkEffects_none.cpp
M src/core/SkPixelRef.cpp
M src/core/SkGraphics.cpp
M src/core/SkFlattenable.cpp
M src/core/SkBitmapProcShader.h
M src/core/SkPathEffect.cpp
M src/core/SkShape.cpp
M src/core/SkXfermode.cpp
M src/core/SkMallocPixelRef.cpp
M src/core/SkBitmapProcShader.cpp
M src/images/SkFlipPixelRef.cpp
M src/images/SkImageRef_GlobalPool.cpp
A src/ports/SkGlobalInitialization_chromium.cpp
M src/ports/SkImageRef_ashmem.h
M src/ports/SkImageRef_ashmem.cpp
A src/ports/SkGlobalInitialization_default.cpp
M gyp/effects.gyp
M gyp/tools.gyp
M gyp/ports.gyp



git-svn-id: http://skia.googlecode.com/svn/trunk@2876 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976e 28-Jul-2011 epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Automatic update of all copyright notices to reflect new license terms.

I have manually examined all of these diffs and restored a few files that
seem to require manual adjustment.

The following files still need to be modified manually, in a separate CL:

android_sample/SampleApp/AndroidManifest.xml
android_sample/SampleApp/res/layout/layout.xml
android_sample/SampleApp/res/menu/sample.xml
android_sample/SampleApp/res/values/strings.xml
android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java
android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java
experimental/CiCarbonSampleMain.c
experimental/CocoaDebugger/main.m
experimental/FileReaderApp/main.m
experimental/SimpleCocoaApp/main.m
experimental/iOSSampleApp/Shared/SkAlertPrompt.h
experimental/iOSSampleApp/Shared/SkAlertPrompt.m
experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig
gpu/src/android/GrGLDefaultInterface_android.cpp
gyp/common.gypi
gyp_skia
include/ports/SkHarfBuzzFont.h
include/views/SkOSWindow_wxwidgets.h
make.bat
make.py
src/opts/memset.arm.S
src/opts/memset16_neon.S
src/opts/memset32_neon.S
src/opts/opts_check_arm.cpp
src/ports/SkDebug_brew.cpp
src/ports/SkMemory_brew.cpp
src/ports/SkOSFile_brew.cpp
src/ports/SkXMLParser_empty.cpp
src/utils/ios/SkImageDecoder_iOS.mm
src/utils/ios/SkOSFile_iOS.mm
src/utils/ios/SkStream_NSData.mm
tests/FillPathTest.cpp
Review URL: http://codereview.appspot.com/4816058

git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
6bac947cd5bc460dd9166ada6310d678fd2e39f8 21-Jun-2011 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add option in flattening to write factory names inline, as we are recording.
SkGPipe needs this, since it cannot (unlike SkPicture) see all of the factories
before it hands its data to the reader.

In this mode, the writer embedds the factory name the first time it sees it,
and then after that writes an index (referencing the fFactorySet). The reader
installs an empty array, and as it encounters names, appends them to that array
so that subsequent indices can be used to retrieve the previously named factory.

Some of the existing patheffects did not register their factory names, so those
changes are also part of this CL. Annoyingly, to register your factory using the
current scheme, it has to be in the public section of the class definition.




git-svn-id: http://skia.googlecode.com/svn/trunk@1663 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
f2eb5ab7806a62e89b8cb572b1b33b70b83b13ab 11-May-2011 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> fix bug where we wrote uninitialized data to the flatten stream for shaders.

Both shader and gradient_shader write matrices to the flatten stream. However, they were
just calling write(&matrix, sizeof(SkMatrix)) and the matrix can contain lazily-computed
function ptrs as part of its internal cache. Thus two matrices that are logically the
same may write different bytes.

This is a problem because picture relies on flattening objects and then using the
flatten stream as a key into its cache. This matrix-write bug effectively kills the
effectiveness of the cache for shaders.

The fix is to write proper read/write functions for matrix (and region btw). These
call through to the existing low-level flatten routines (which just write into a
memory ptr).



git-svn-id: http://skia.googlecode.com/svn/trunk@1290 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
e9e08cc7b29f97ee9e823e68c3daf0f55c84b21a 29-Apr-2011 mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> rename SkPtrRecorder and related wrappers to SkPtrSet, since that is the pattern
is it providing. Also add a templated wrapper to handle typecasting of ptr types.



git-svn-id: http://skia.googlecode.com/svn/trunk@1214 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
7ffb1b21abcc7bbed5a0fc711f6dd7b9dbb4f577 15-Mar-2011 ctguil@chromium.org <ctguil@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add code needed to build skia as a windows dll within the chromium project.
- Export/import skia APIs if SKIA_DLL is defined.
- This change has no effect on skia.

Review URL: http://codereview.appspot.com/4282042

git-svn-id: http://skia.googlecode.com/svn/trunk@944 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h
8a1c16ff38322f0210116fa7293eb8817c7e477e 17-Dec-2008 reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> grab from latest android



git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkFlattenable.h