History log of /external/skia/src/core/SkBlitter.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9f23a27ed9961fd4575864e590eda328452895e7 10-Sep-2014 reed <reed@google.com> make set3DMask virtual, so we can safely notify the shadercontext

also boost preallocated storage to account for this combo of bitmapshader + emboss + colorfilter

BUG=skia:
R=djsollen@google.com

Author: reed@google.com

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

bug:16307475
Change-Id: I404fa776511a27b7be1b3b41dcb06b8b828a4716
/external/skia/src/core/SkBlitter.cpp
ca76c55d60dfe041e30e210d41fa0feb7fb54a1f 04-Jun-2014 scroggo <scroggo@google.com> Use Identity matrix for SkTransparentShader.

The SkTransparentShader is just a placeholder that should not
actually be used, so its CTM is not meaningful. However, it needs
to be invertible in order to not assert in SkShader::Context's
constructor. So use SkMatrix::I().

This fixes a CTS test on Android.

R=reed@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/315743003
/external/skia/src/core/SkBlitter.cpp
f31fa24914c683abcc2c860093b142725c43fbe6 12-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make gMask_00FF00FF a constant

This is to optimize SkAlphaMulQ() in PIC mode. With the visibility=default
symbol the constant is not known at compile time (and is not a constant), but
instead is fetched through a double indirection through GOT. The function is
quite hot on one of the chromium benchmarks:
rasterize_and_record_micro.key_silk_cases.

This change replaces the symbol with a compile-time constant. As a bonus the
variable is not exported from the dynamic library, i. e. a cleaner library
interface.

See specific performance improvements on Android here:
http://goo.gl/iMuTDt

R=skyostil@chromium.org, tomhudson@chromium.org, mtklein@google.com, reed@google.com, tomhudson@google.com

Author: pasko@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14696 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
80116dcf1e1baf9817ae42d0aca51f7eabaa2880 06-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> add local-matrix to shader::context

BUG=skia:
R=scroggo@google.com, dominikg@chromium.org

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14592 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
ce56d965069c1649afe14319cb239e6ad670682a 05-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove SkShader virtual method validContext

patch from issue 267923005

BUG=skia:
R=scroggo@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14573 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
e901b6de3ef8dea842008a08fc81e92fb1478d61 01-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> create struct to hold all the params passed around for shader::context

BUG=skia:
R=scroggo@google.com, dominikg@chromium.org

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14514 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
76a3b2abd02841c4ae786ac4cf59c3a51c545f73 24-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove support for inheriting the paint color from SkColorShader

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

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14355 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
87fcd950198a16211b3988610beebb5ca5bcf323 23-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Revert of Extract most of the mutable state of SkShader into a separate Context object. (https://codereview.chromium.org/249643002/)

Reason for revert:
Chromium side change landed along side DEPS roll that includes r14323.

Original issue's description:
> Revert of Extract most of the mutable state of SkShader into a separate Context object. (https://codereview.chromium.org/207683004/)
>
> Reason for revert:
> This is blocking the DEPS roll into Chromium. Failures can be seen here:
>
> http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/174333
>
> Original issue's description:
> > Extract most of the mutable state of SkShader into a separate Context object.
> >
> > SkShader currently stores some state during draw calls via setContext(...).
> > Move that mutable state into a separate SkShader::Context class that is
> > constructed on demand for the duration of the draw.
> >
> > Calls to setContext() are replaced with createContext() which returns a context
> > corresponding to the shader object or NULL if the parameters to createContext
> > are invalid.
> >
> > TEST=out/Debug/dm
> > BUG=skia:1976
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14216
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14323
>
> TBR=scroggo@google.com,skyostil@chromium.org,tomhudson@chromium.org,senorblanco@chromium.org,reed@google.com,bungeman@google.com,dominikg@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:1976
>
> Committed: http://code.google.com/p/skia/source/detail?r=14326

R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com, dominikg@chromium.org
TBR=bungeman@google.com, dominikg@chromium.org, reed@google.com, scroggo@google.com, senorblanco@chromium.org, skyostil@chromium.org, tomhudson@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:1976

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14328 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
6e5671d8c9b2d9885e351b631b1dfbb4ed403789 23-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Extract most of the mutable state of SkShader into a separate Context object. (https://codereview.chromium.org/207683004/)

Reason for revert:
This is blocking the DEPS roll into Chromium. Failures can be seen here:

http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/174333

Original issue's description:
> Extract most of the mutable state of SkShader into a separate Context object.
>
> SkShader currently stores some state during draw calls via setContext(...).
> Move that mutable state into a separate SkShader::Context class that is
> constructed on demand for the duration of the draw.
>
> Calls to setContext() are replaced with createContext() which returns a context
> corresponding to the shader object or NULL if the parameters to createContext
> are invalid.
>
> TEST=out/Debug/dm
> BUG=skia:1976
>
> Committed: http://code.google.com/p/skia/source/detail?r=14216
>
> Committed: http://code.google.com/p/skia/source/detail?r=14323

R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com, dominikg@chromium.org
TBR=bungeman@google.com, dominikg@chromium.org, reed@google.com, scroggo@google.com, senorblanco@chromium.org, skyostil@chromium.org, tomhudson@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:1976

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14326 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
bc2f1dc85e458af7bdb87873e60207f9f7299e4a 23-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Extract most of the mutable state of SkShader into a separate Context object.

SkShader currently stores some state during draw calls via setContext(...).
Move that mutable state into a separate SkShader::Context class that is
constructed on demand for the duration of the draw.

Calls to setContext() are replaced with createContext() which returns a context
corresponding to the shader object or NULL if the parameters to createContext
are invalid.

TEST=out/Debug/dm
BUG=skia:1976

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

R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com

Author: dominikg@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14323 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
53783b026a00683c1fb504127c3398dabb61ea73 17-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Extract most of the mutable state of SkShader into a separate Context object. (https://codereview.chromium.org/207683004/)

Reason for revert:
Causing memory leaks in Chromium.

Original issue's description:
> Extract most of the mutable state of SkShader into a separate Context object.
>
> SkShader currently stores some state during draw calls via setContext(...).
> Move that mutable state into a separate SkShader::Context class that is
> constructed on demand for the duration of the draw.
>
> Calls to setContext() are replaced with createContext() which returns a context
> corresponding to the shader object or NULL if the parameters to createContext
> are invalid.
>
> TEST=out/Debug/dm
> BUG=skia:1976
>
> Committed: http://code.google.com/p/skia/source/detail?r=14216

R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, dominikg@chromium.org
TBR=dominikg@chromium.org, reed@google.com, scroggo@google.com, senorblanco@chromium.org, skyostil@chromium.org, tomhudson@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:1976

Author: bungeman@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14247 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
001f4ed2fb62ecdc98ce2884d925de11b7516d23 16-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Extract most of the mutable state of SkShader into a separate Context object.

SkShader currently stores some state during draw calls via setContext(...).
Move that mutable state into a separate SkShader::Context class that is
constructed on demand for the duration of the draw.

Calls to setContext() are replaced with createContext() which returns a context
corresponding to the shader object or NULL if the parameters to createContext
are invalid.

TEST=out/Debug/dm
BUG=skia:1976
R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com

Author: dominikg@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14216 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
28fcae2ec77eb16a79e155f8d788b20457f1c951 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)

Reason for revert:
Want to reland the original CL.

Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144

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

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14156 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
96edc2459820f0f60ea9b57959c1e5018ef95e28 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)

Reason for revert:
Chrome's side of define changes not easy to figure out quickly. Reverting this for DEPS roll for now.

Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117

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

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14149 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
d923288e50b5a69afb0bdd5c161191b24cab8345 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)

Reason for revert:
fixes on the chrome side are landing (brettw), keep fingers crossed.

Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144

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

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14145 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
757ebd20ef284b6428eb9f4b9b69826cc3640a82 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)

Reason for revert:
breaking the Chrome deps roll.
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio

Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117

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

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14144 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
149e9a107c356b0151433fb23c2b1c8d0634947c 09-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Rename kPMColor_SkColorType to kN32_SkColorType.

The new name better represents what this flag means.

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

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14117 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
0f10f7bf1fb43ca6346dc220a076773b1f19a367 13-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Allow toString capability to be toggled independent of developer mode.

This change is motivated by the desire to see the text information in the debugger when not in developer mode. It is structured so user's can disable it if the capability is not wanted.

R=bsalomon@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13795 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
a5572e5bb2a2bbeeb59de0741c2527869d365a0c 07-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add a class to allocate small objects w/o extra calls to new.

Add SkSmallAllocator, a template for allocating small (as defined by the
instantiation) objects without extra calls to new. Add a helper macro to
make using it simple.

Remove SkTemplatesPriv.h, whose behavior is replaced by SkSmallAllocator.
The old SK_PLACEMENT_NEW had the following drawbacks:
- Easily confused with SkNEW_PLACEMENT.
- Requires passing around lots of void*s along with the storageSize.
- Requires using a separate class for deleting it.
- We had multiple ways Auto objects for deleting in different places.
- It always did a straight heap allocation on Windows, meaning Windows
did not get any advantages from the confusing code.
The new SkSmallAllocator simplifies things:
- It is clear about what it does.
- It takes care of the deletion in one place that is automatically
handled.

Further, the new class can be used to create more than one object. This
is in preparation for BUG=skia:1976, for which we would like to create
a new object without extra heap allocations. The plan is to create both
the blitter and the new object on the stack using the SkSmallAllocator.

Add a new test for SkSmallAllocator.

SkShader.h:
Move the private version of CreateBitmapShader to SkBitmapProcShader
(which already has the implementation) and remove the friend class
(which was only used to call this private function). This allows
SkSmallAllocator to reside in the private src/ directory.

SkBitmapProcShader:
Move CreateBitmapShader and the macro for the storage size here. With
the macro in a (private) header, the (private) headers with function
declarations (which now depend on the storage size used) can see the
macro.
Use SkSmallAllocator in CreateBitmapShader.
Change the macro to kBlitterStorageByteCount, since SkSmallAllocator
takes a byte count as its template parameter.

SkBlitter:
Use the SkSmallAllocator.
Remove Sk3DShader::fKillProc and SkAutoCallProc. Both of their
behaviors have been moved into SkSmallAllocator (SkAutoCallProc was
unnecessary anyway, because the only time we ever used it we also
called detach(), so its auto behavior never happened).
Create the Sk3DShader on the stack, if there's room.
Remove the helper version of Choose, which was unused.

SmallAllocatorTest:
Test for the new class.

The rest:
Use SkSmallAllocator.

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

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13696 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
900ecf2f1579d42c9d2959831787af0346320f86 20-Feb-2014 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> use colortype instead of config

patch from issue 172063004

BUG=skia:
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13520 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.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/SkBlitter.cpp
d6bab0238655dbab24dfe92bd0b16b464310a8c7 02-Dec-2013 rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverting r12427

git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
5b39f5ba9c339d1e4dae391fee9ec1396feec180 02-Dec-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
11f392ed531f05e8de6b6af6ae607f90aeb080c6 26-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "remove kA1_Config, as it is no longer supported""

This reverts commit 36d712f2d4c5c79719280ad95523e6aaa88b068e.

BUG=
R=rmistry@google.com, mtklein@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12392 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
72e7808d62c02f0371135b1c152bd00b73f62479 25-Nov-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "remove kA1_Config, as it is no longer supported"

This reverts commit 2d72d8b242eac6e9d30228f5b0a407236491c369.

git-svn-id: http://skia.googlecode.com/svn/trunk@12387 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
2a1f4464d150d2dc8c3fe2f39e9fb3503b7f4f54 25-Nov-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remove kA1_Config, as it is no longer supported

BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12384 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
e61a86cfa00ea393ecc4a71fca94e1d476a37ecc 18-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Guard against most unintentionally ephemeral SkAutoFoo instantiations.

I think I applied the trick everywhere possible. Limitations:
- can't be used with templated classes
- all constructors and destructors must be defined inline

A couple of the SkAutoFoo were unused in Skia, Chromium, and Android, so I
deleted them. This change caught the same bugs Cary found in SkPath, plus one
more in SampleApp.

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

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12301 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
ab7442c8d733e0642d1cd80af23cdab43d77039e 08-Nov-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@12186 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
126f7f5244502c0cbf1e5fec1d2ad7a0f2eb6c34 07-Nov-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values.""

This reverts commit 3c77887b3eb2d32ab668ab4e5f2f9e79103956e8.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12167 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
84e922bfb3e7a03f6e35beb2f1e4f2657e7cd3e9 04-Nov-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values."

This reverts commit d615e839b71f75df895de6850b774a9e1c28ad2a.

Revert "must initialize SkDraw.fClip"

This reverts commit 108e46d29b5f57927fc8b8c403bb52019d8cb16d.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12122 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
ac9d306a92e569e85a7611e9db00943b5b551f1e 04-Nov-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12118 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
4469938e92d779dff05e745559e67907bbf21e78 31-Oct-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning""

This reverts commit 1e787c38fa71f2a21fd728f1b1d620b9b09b0d3d.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12057 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
6fcbfcead5dc1b61fa5b4c139a1a3714e8c58091 31-Oct-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"

This reverts commit 1d22c4aaf9d8f053f25194a1ed74b137bfb19497.

git-svn-id: http://skia.googlecode.com/svn/trunk@12056 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
081560e3abe25c4821b79ca1465f4dbd371c4b5c 31-Oct-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning

BUG=
R=robertphillips@google.com, senorblanco@chromium.org, vandebo@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12055 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
353482251e61971a8cf3a60bbb6910f482be634f 16-Oct-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> force readbuffer clients to use specialized readFoo for flattenables

BUG=
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11803 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
6ba4572eed5a4ecfdd22d118fa55b5c06902b574 21-Jun-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remove dst/rendertarget support for kARGB_4444_Config

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9727 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
e16efc1882ab34a0bb3ae361a2d37f840044cf87 26-Jan-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
76f9e938df0b5826fd4c80b854ceafaf385cfbe1 15-Jan-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Added print out of SkShader information to debugger

https://codereview.appspot.com/7105045/



git-svn-id: http://skia.googlecode.com/svn/trunk@7201 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
ea033606a06d05d2d42aa7118409fee798e53167 14-Dec-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add per-draw checks for lockcounts
Review URL: https://codereview.appspot.com/6943056

git-svn-id: http://skia.googlecode.com/svn/trunk@6815 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
61b05dcc7ebe48663c3ba84b7bd7449d6c887ac1 14-Dec-2012 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@6809 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
a641f3f18e5319773989812a888f3fad49e4f2ad 13-Dec-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> reland 6798 w/ fix for bitmap-as-mask pixel-locking



git-svn-id: http://skia.googlecode.com/svn/trunk@6806 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
135e16cd8ebb2ba30458b284d4a17e1eea81ad35 13-Dec-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> revert 6798 (assert in GM)



git-svn-id: http://skia.googlecode.com/svn/trunk@6802 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
1adcf8859cc9414591038e440e3f22382c8e4aa0 13-Dec-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Goal: ensure we always balance lock/unlock pixels calls.

A big caller of lockPixels is setContext in the bitmapshader.

This change replaces beginSession/endSession with adding endContext(), and
adds debugging code to ensure that
1. setContext calls are never nested
2. endContext is always called after each setContext call.
Review URL: https://codereview.appspot.com/6937046

git-svn-id: http://skia.googlecode.com/svn/trunk@6798 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
5f0add3ad6e1d6129307276c81ba6624f92ca112 26-Nov-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remove legacy build-guards, now that webkit has rebaselined these.

SK_DISABLE_FAST_AA_STROKE_RECT
SK_IGNORE_FAST_BLURRECT
SK_DISABLE_EXTRACTSUBSET_OPAQUE_FIX
SK_IGNORE_CF_OPTIMIZATION
SK_IGNORE_NEW_STROKERECT
SK_DISABLE_GPU_BLUR
SK_IGNORE_ROTATED_FREETYPE_FIX

The changes should all be:

remove code for #ifdef
remove guard for #ifndef
Review URL: https://codereview.appspot.com/6858073

git-svn-id: http://skia.googlecode.com/svn/trunk@6546 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
13201e74f43b9c5fa173339eb36de515370e6973 16-Nov-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> fold kClear_Mode into kSrc_Mode, and make kSrc_Mode go faster
Review URL: https://codereview.appspot.com/6851054

git-svn-id: http://skia.googlecode.com/svn/trunk@6451 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
5dc26b97366934ba0f896cea02a3fec027d5d5c1 11-Oct-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> SkTCopyOnFirstWrite

R=reed@google.com
Review URL: https://codereview.appspot.com/6650047

git-svn-id: http://skia.googlecode.com/svn/trunk@5905 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
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/src/core/SkBlitter.cpp
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/src/core/SkBlitter.cpp
02f65f2d9168f2304a09d784dbcfeefb7669c8b4 06-Aug-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> move SkFilterShader into private header
Review URL: https://codereview.appspot.com/6454107

git-svn-id: http://skia.googlecode.com/svn/trunk@4961 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
458849004892c05fa1dcbcf6d355dfcce028d77a 11-May-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> lazily make a copy of the paint when choosing a blitter. For simple draws,
this is never actually needed, and it is faster to skip the copy.



git-svn-id: http://skia.googlecode.com/svn/trunk@3908 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
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/src/core/SkBlitter.cpp
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/src/core/SkBlitter.cpp
8796ee60b79307629c56bf9f3e146833b312b957 23-Feb-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remove bogus assert (leftover from some long-forgotten debugging session)



git-svn-id: http://skia.googlecode.com/svn/trunk@3240 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
31bab3934c773c2bd4c1e5e9ba8eb87c1c623b09 03-Jan-2012 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix off-by-one error in assertion; improve coverage_to_exact_alpha()
implementation.

http://codereview.appspot.com/5504116/



git-svn-id: http://skia.googlecode.com/svn/trunk@2947 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
a31ac73b8e261f02c4bd6ae1d622c4bd00226b80 29-Dec-2011 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Tighten up restrictions on blit width: some shaders assert that they
are addressing more than 0 pixels.
codereview.appspot.com/5489125/



git-svn-id: http://skia.googlecode.com/svn/trunk@2935 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
4714359ec091b34a4f88eb9708868a58a22177d3 28-Dec-2011 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Bugfixes to antialiased blitting.
More details of blitter contracts in function headers.
New precautionary assert in one high-level default blitter.



git-svn-id: http://skia.googlecode.com/svn/trunk@2928 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
0c00f21fee3f5cfa3aa7e5d46ff94cb8cf340451 28-Dec-2011 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add SkDEBUGFAIL to clean up use of SkASSERT(!"text");
catch a couple of latent SkASSERT("text") bugs.

http://codereview.appspot.com/5504090/



git-svn-id: http://skia.googlecode.com/svn/trunk@2926 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
49eac192faa35159752525b23345563252721c64 27-Dec-2011 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> New 'blitAntiRect' entry point for blitters, specialized in supersampling
code to avoid quarter-scanline-at-a-time building of large rectangular
clips.

Speeds up aa_clip_build_path_AA benchmark 2x, aa_clip_build_rect_AA benchmark
10x or more. This is a sufficient performance gain to let Chromium reenable
WebKit's soft clipping code. Rolling into Chromium will require ~18
rebaselines.



git-svn-id: http://skia.googlecode.com/svn/trunk@2924 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
a89c77b5cafcc13d76cb07c3240e48705cb30d8f 01-Dec-2011 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> revert 2783 -- broke debug gm



git-svn-id: http://skia.googlecode.com/svn/trunk@2784 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
f974a5d7826688c9d87cc36a56c697ea5fae12de 01-Dec-2011 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> New function SkBlitter::blitAntiRect(); specifically accelerated for
supersampled antialiased clips.



git-svn-id: http://skia.googlecode.com/svn/trunk@2783 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
be2aa2aa1f8bf73d974bdd9438fc741bbf0cfbe6 17-Nov-2011 mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> use AsMode instead of deprecated IsMode



git-svn-id: http://skia.googlecode.com/svn/trunk@2705 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
7989186dab6bc2f1c1927daf91bddd32b7fd8d0c 18-Oct-2011 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> rename SkMask::getAddr to getAddr8, to match the specificity of the others
e.g. getAddr1, getAddrLCD16, etc.

This is to make way for a real getAddr that will compute its pixel-size at runtime



git-svn-id: http://skia.googlecode.com/svn/trunk@2487 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
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/src/core/SkBlitter.cpp
6b7aee387d3b4b2df5894b51fa1c0baf649c6540 19-Apr-2011 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> optimize when we have a colorfilter, but no shader or xfermode



git-svn-id: http://skia.googlecode.com/svn/trunk@1152 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
82065d667f64e232bcde2ad849756a6096fcbe6f 07-Feb-2011 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remove SkRefCnt safeRef() and safeUnref(), and replace the call-sites with
SkSafeRef() and SkSafeUnref().

This is basically a bug waiting to happen. An optimizing compiler can remove
checks for null on "this" if it chooses. However, SkRefCnt::safeRef() relies on
precisely this check...

void SkRefCnt::safeRef() {
if (this) {
this->ref();
}
}

Since a compiler might skip the if-clause, it breaks the intention of this
method, hence its removal.

static inline void SkSafeRef(SkRefCnt* obj) {
if (obj) {
obj->ref();
}
}

This form is not ignored by an optimizing compile, so we use it instead.




git-svn-id: http://skia.googlecode.com/svn/trunk@762 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
d6a5f4e2008d96a896c76ca031bece0723e16e3c 22-Oct-2009 reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> clear xfermode in paint to reflect that we saw it was srcover

This allows our asserts in the RGB16 blitter chooser to pass.



git-svn-id: http://skia.googlecode.com/svn/trunk@403 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
1fc4c605def61d9e10489f9cd63dc378baa6ade3 02-Oct-2009 reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> move factory for 565 into its own file



git-svn-id: http://skia.googlecode.com/svn/trunk@374 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
cafc9f9e80e30fa75ad8a952e7a290e72f211ce7 22-Aug-2009 reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> fixes around isOpaque and dithering

- copyTo() now preserves isOpaqueness, and BitmapCopyTest tests it
- bitmap shader doesn't claim to have shadespan16 if dithering is on, since its
sampler doesn't auto-dither (note that gradients do auto-dither in their
16bit sampler)
- blitter setup just relies on the shader to report if its 16bit sampler can be
called (allowing gradients to say yes regardless of dither, but bitmaps to say
no if dithering is on)



git-svn-id: http://skia.googlecode.com/svn/trunk@331 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
845fdaca174f4675e9acc164b510e3a5ffa9053c 23-Jun-2009 reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remove deprecated use of porterduff enum



git-svn-id: http://skia.googlecode.com/svn/trunk@235 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
9a74d313452f30629e2615eb8cbfe902433582c0 15-Jun-2009 reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> create separate opaque version of rgb16 blitter



git-svn-id: http://skia.googlecode.com/svn/trunk@216 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
5119bdb952025a30f115b9c6a187173956e55097 12-Jun-2009 reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add shader flag kConstInY_Flag
this signals blitters that the shader will return the same results for a given
x value, independent of y. Useful inside blitRect(), where it can cache the
first call to shadeSpan() and reuse it on all subsequent scans. Works with
(non-rotated) linear-gradients, and Nx1 bitmaps.



git-svn-id: http://skia.googlecode.com/svn/trunk@214 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
d252db03d9650013b545ef9781fe993c07f8f314 01-Apr-2009 reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> API change: SkPath computeBounds -> getBounds



git-svn-id: http://skia.googlecode.com/svn/trunk@140 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/core/SkBlitter.cpp
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/src/core/SkBlitter.cpp