History log of /external/skia/src/effects/SkArithmeticMode.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
51a11b7f2f7c0021022004d0d4b0924a590990f9 02-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Arithmetic mode now has the option of not validating the output color, which will allow multiple arithmetic operations to be done sequentially, without intermediate clamping. This is required for mimicking blink's current behavior.

BUG=skia:
R=senorblanco@google.com, senorblanco@chromium.org, reed@google.com, bsalomon@google.com

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14031 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.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/effects/SkArithmeticMode.cpp
6aa6fec0e332c9246958245bad5fc881fefee68f 03-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Cleanup patch to move all of SkImageFilterUtils into SkImageFilter.

This was a utility class that dates from before GPU code was allowed
in core. Now that it is, there's no reason not to have this
functionality in SkImageFilter.

Covered by existing tests.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13646 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
0a2bf90dccba3bde188e0386a7f0c60e6dde1ae9 20-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Factory methods for heap-allocated SkPathEffect and SkXfermode objects.

This is part of an effort to ensure that all SkPaint effects can only be
allocated on the heap.

This patch makes the constructors of SkPathEffect, SkXfermode and
their subclasses non-public and instead provides factory methods for
creating these objects on the heap. We temporarily keep the constructors
of the following classes public to not break Chrome/Blink:

SkXfermode
SkCornerPathEffect
SkDashPathEffect

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

Author: dominikg@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13519 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.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/effects/SkArithmeticMode.cpp
8f4d2306fa866a26f9448048ff63f692b2ba43aa 17-Dec-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats

To keep the CL (slightly) managable, this does not make any changes to
existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this
time around.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
ccecbbb2eaef1042c860cf56427e8d237a95c312 24-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Always create an instance when testing GrEffects for SkXfermode and SkArithmeticMode

Previously the TestCreate methods of the effects would create a static
instance and return that for all invocations. This is probably a
copy-paste error going back to initial TestCreate method in r8449. At
that time, the effect was always the same and thus static usage made
sense.

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

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11939 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
1a6382f5e76c051ffbbb60f3a68524dfe57cf798 23-Oct-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Split up SkXfermode::asNewEffectOrCoeff() into asNewEffect(), asCoeff().

R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11926 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
fbcd415aa01801df5f554963d7463649b49ead73 23-Oct-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove GrContext from SkXfermode::[Aa]sNewEffectOrCoeff() and all subclasses,
since it's unused.

R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11913 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
824c346b6e0e114063c1a8ad4ba7c3a669ee2cff 10-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Express (GLSL expression, possibly known value) pairs as a class

Express (GLSL expression, possibly known value) pairs as a class
instead of two variables Introduces GrGLSLExpr<N> to encapsulate
the expression and possibly constant-folded value of the expression.

This simplifies passing of the expressions to functions.

Changes the shaders with following patterns:
{ // Stage 0: Linear Gradient
vec4 colorTemp = mix(uGradientStartColor_Stage0, uGradientEndColor_Stage0, clamp(vMatrixCoord_Stage0.x, 0.0, 1
colorTemp.rgb *= colorTemp.a;
- output_Stage0 = vec4((vColor) * (colorTemp));
+ output_Stage0 = (vColor * colorTemp);
+ }

Previously the vector cast was always added if constant folding was
effective, regardless of the term dimensions. Now the vector upcast is
not inserted in places where it is not needed, ie. when the binary
operator term is of the target dimension.

Also, some parentheses can be omitted. It is assumed that
GrGLSLExpr<N>("string") constructors construct a simple expression or
parenthesized expression.

Otherwise the shader code remains identical.

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

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11690 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
77af6805e5faea1e2a5c0220098aec9082f3a6e5 02-Oct-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Make GPU coord transforms automatic

Adds a GrCoordTransform class and updates the framework to handle
coord transforms similar to how it handles textures with
GrTextureAccess. Renames GrGLEffectMatrix to GrGLCoordTransform and
slightly repurposes it to be used by the framework instead of effects.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11569 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
e0e7cfe44bb9d66d76120a79e5275c294bacaa22 09-Sep-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Change old PRG to be SkLCGRandom; change new one to SkRandom

The goal here is to get people to start using the new random number
generator, while leaving the old one in place so we don't have to
rebaseline GMs.

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

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
74a3a2135ca82ab9324b7e499caa3280348a4fda 30-Aug-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Rename ShaderType enum to ShaderVisibility

Renames ShaderType in GrGLShaderBuilder to ShaderVisibility. It is now
used solely as a bitfield. Methods that previously accepted a single
ShaderType value are split into separate calls:

- getShader -> vsGetShader, gsGetShader, fsGetShader
- emiitFunction -> fsEmitFunction
- appendTextureLookup -> fsAppendTextureLookup

No change in functionality. This is a refactoring to allow us to
separate the vertex/geometry and fragment parts of GrGLShaderBuilder.

R=bsalomon@google.com

Author: cdalton@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11044 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
7ab7ca4199e97126de01d507d34f60a07843937f 28-Aug-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix case where GrGLEffectMatrix gives back a dangling ptr for the coords var name.

R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10982 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
96ae688f03f05a53c2ae6e66a431e180b90be9cd 14-Aug-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> effects: Replaces uses of GrAssert with SkASSERT.

This is the first step on migrating from GrAssert to SkASSERT as requested by
Brian.

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

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10706 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
b1b3d5122eab334f567d699d2afea641204f2acf 13-Jun-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Disable the unpremultiply/remultiply in SkArithmeticMode, both raster and GPU, since the SVG spec actually defines arithmetic compositing to operate on premul colours directly.

The unpremul/remul code has been placed behind a gUseUnpremul global, which is default false. The non-unpremul path uses a min() to keep the colours to valid premult values.

Note: This change will require new baselines for the arithmode and xfermodeimagefilter GMs.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9555 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
86fc266eda887920e3dd104bee8121ae19729cf5 31-May-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement SkXfermode image filter. This required changing the signature of SkXfermode::asNewEffectOrCoeffs(), to add an optional background texture.

For the raster path, we do a straightforward 2-pass method: draw background, then composite the foreground over it.

For the GPU path, if the xfermode can be expressed as an effect, we build an effect with the background texture incorporated, then do a single-pass draw fetching both foreground and background textures, and compositing to the result. If the xfermode is expressed as src/dst coefficients, we do a 2-pass draw as in the raster path and use fixed-function blending.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9373 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
1afa3fff2987e3f4ea4383477467a13be78bc210 30-May-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Speculative fix for Tegra-based Androids: don't try to unpremultiply dstColor in-place; put it in a temporary.

TBR=bsalomon

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9336 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
9a6eb0e1e8a8de7371cd9604f34619b8f87de66f 29-May-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect exposed via asNewEffectOrCoeff().

Doing it this way required modifying the arithmode GM to use saveLayer()/restore() rather than creating an offscreen SkBitmap, since otherwise the compositing is always done in raster mode. Fixing that in turn exposed that SkArithmeticMode did not work in Picture mode, since it wasn't flattenable. Made it so.

Note: this will require rebaselining the arithmode GM (again).

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

Originally committed: https://code.google.com/p/skia/source/detail?r=9324
Reverted: https://code.google.com/p/skia/source/detail?r=9325

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9330 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
06e7424c70595cdfeee9a0ce8a2fb0f7f17eac41 29-May-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect exposed via asNewEffectOrCoeff()."

This reverts commit b8ffe17b5c684f9cfff02285f27e6aa1f75c9b53.

TBR=robertphillips

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9325 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
6b6c1dc34c299be87a3ff3ab41d3d4fd0f96a846 29-May-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect exposed via asNewEffectOrCoeff().

Doing it this way required modifying the arithmode GM to use saveLayer()/restore() rather than creating an offscreen SkBitmap, since otherwise the compositing is always done in raster mode. Fixing that in turn exposed that SkArithmeticMode did not work in Picture mode, since it wasn't flattenable. Made it so.

Note: this will require rebaselining the arithmode GM (again).

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9324 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
35c733cc9ce71c4513dfb6f39c4d9df5905e897c 28-May-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix alpha computation in SkArithmeticMode.

Note: this will require new baselines for the arithmode GM.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9302 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.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/effects/SkArithmeticMode.cpp
98ded84b80918ac1e40224c125922941f3b2eb03 23-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@7332 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
b83b6b4f7690fe929d8d6b1a3d2b7ed562b95ba6 22-Jan-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Added toString to SkXfermode-derived classes (for debugger)

https://codereview.appspot.com/7139058/



git-svn-id: http://skia.googlecode.com/svn/trunk@7308 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
30da745bbf67a0ee0f305ca7bbdb685cc8a9e686 17-Dec-2012 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Mark all methods on SkXfermode as const, in preparation for declaring all
xfermodes as immutable/reentrant-safe
Review URL: https://codereview.appspot.com/6941065

git-svn-id: http://skia.googlecode.com/svn/trunk@6855 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
0e330ae5f90ef8a4a864329b9a634644a05bf124 12-Aug-2012 mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> revert arith change, until I can rebaseline all the images (and check chrome)



git-svn-id: http://skia.googlecode.com/svn/trunk@5044 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
d51ea26ea17e88e2ab1bd6eb5672d59b63892346 12-Aug-2012 mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> use premul macro to pack components



git-svn-id: http://skia.googlecode.com/svn/trunk@5043 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
383d5d494992554cde776c8b5b359d30e431bc78 06-Jun-2012 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> fix warnings on Mac in src/effects

Fix these class of warnings:
- unused functions
- unused locals
- sign mismatch
- missing function prototypes
- missing newline at end of file
- 64 to 32 bit truncation

The changes prefer to link in dead code in the debug build
with 'if (false)' than to comment it out, but trivial cases
are commented out or sometimes deleted if it appears to be
a copy/paste error.
Review URL: https://codereview.appspot.com/6299049

git-svn-id: http://skia.googlecode.com/svn/trunk@4181 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp
5efe0cb04961ef98fbe520ee732fbe50b4195ad3 10-Apr-2012 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Clean up more Visual Studio warnings, including apparent bug in Arithmetic mode.



git-svn-id: http://skia.googlecode.com/svn/trunk@3645 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.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/effects/SkArithmeticMode.cpp
e51755fc64bf5df4bed9d74f4bca4f70897d59a9 10-Dec-2011 mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> add first cut at arithmetic mode



git-svn-id: http://skia.googlecode.com/svn/trunk@2849 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkArithmeticMode.cpp