fmalita
02c8fd0ad5
Move SVG parser files under {include,src}/svg/parser/
...
R=reed@google.com
Review URL: https://codereview.chromium.org/884713007
2015-02-06 08:43:51 -08:00
reed
3cb3840c9a
Rename SkCanvasDrawable to SkDrawable, and make public
...
(patchset #2 id:20001 of https://codereview.chromium.org/903993002/ )"
This reverts commit c4e8772492
.
BUG=skia:
TBR=
NOTREECHECKS=True
Review URL: https://codereview.chromium.org/898343004
2015-02-06 08:36:15 -08:00
reed
c4e8772492
Revert of rename SkCanvasDrawable to SkDrawable, and make public (patchset #2 id:20001 of https://codereview.chromium.org/903993002/ )
...
Reason for revert:
bug in gyp
Original issue's description:
> rename SkCanvasDrawable to SkDrawable, and make public
>
> BUG=skia:
> NOTRY=True
> ... winbuilder flake
>
> Committed: https://skia.googlesource.com/skia/+/4ae9eb7463cf2160723407359608f221c0d5e2a6
TBR=robertphillips@google.com ,djsollen@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/882853006
2015-02-06 08:20:07 -08:00
reed
4ae9eb7463
rename SkCanvasDrawable to SkDrawable, and make public
...
BUG=skia:
NOTRY=True
... winbuilder flake
Review URL: https://codereview.chromium.org/903993002
2015-02-06 08:02:57 -08:00
bungeman
7fa87cd09f
Add factory for Android font manager.
...
This allows users to create an Android font manager with their own set
of fonts, or augment the system set. This will allow for removal of
the current globals which are used for a similar, but more constained,
purpose.
BUG=skia:2817,skia:3314,chromium:407340
Review URL: https://codereview.chromium.org/887113002
2015-02-06 07:59:19 -08:00
bsalomon
50785a3d10
Revert of Revert of Move DstCopy on gpu into the GrXferProcessor. (patchset #1 id:1 of https://codereview.chromium.org/901663007/ )
...
Reason for revert:
The revert didn't help the 10.9 bot. Unreverting by reverting the revert (which is basically relanding the original patch which itself was a revert of a revert). Revert.
Original issue's description:
> Revert of Move DstCopy on gpu into the GrXferProcessor. (patchset #11 id:200001 of https://codereview.chromium.org/885923002/ )
>
> Reason for revert:
> Testing to see if reverting fixes 10.9 bots.
>
> Original issue's description:
> > Move DstCopy on gpu into the GrXferProcessor.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/74a11753604768bf461b80cabb66060e8564d82c
> >
> > Committed: https://skia.googlesource.com/skia/+/5e1378d0e075a323144ba14e0a4cbcca35eccc69
>
> TBR=joshualitt@google.com ,egdaniel@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/21b2c53218ab25f4268e3992e51d916076a2a7ee
TBR=joshualitt@google.com ,egdaniel@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/873723009
2015-02-06 07:02:37 -08:00
bsalomon
21b2c53218
Revert of Move DstCopy on gpu into the GrXferProcessor. (patchset #11 id:200001 of https://codereview.chromium.org/885923002/ )
...
Reason for revert:
Testing to see if reverting fixes 10.9 bots.
Original issue's description:
> Move DstCopy on gpu into the GrXferProcessor.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/74a11753604768bf461b80cabb66060e8564d82c
>
> Committed: https://skia.googlesource.com/skia/+/5e1378d0e075a323144ba14e0a4cbcca35eccc69
TBR=joshualitt@google.com ,egdaniel@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/901663007
2015-02-05 14:18:05 -08:00
egdaniel
5e1378d0e0
Move DstCopy on gpu into the GrXferProcessor.
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/74a11753604768bf461b80cabb66060e8564d82c
Review URL: https://codereview.chromium.org/885923002
2015-02-05 11:11:13 -08:00
joshualitt
de358a9946
BUG=skia:
...
Review URL: https://codereview.chromium.org/894693003
2015-02-05 08:19:35 -08:00
reed
e73da40c35
add length parameter to addText, to match attr values
...
BUG=skia:3392
Review URL: https://codereview.chromium.org/896363002
2015-02-04 18:29:27 -08:00
bsalomon
d2a6f4e419
More cleanup around GrContext, textures, and SkGr.cpp
...
Review URL: https://codereview.chromium.org/880983008
2015-02-04 10:55:54 -08:00
reed
b0df8be137
return reference to cache instead of copying the mask
...
BUG=437128
Review URL: https://codereview.chromium.org/889303005
2015-02-04 09:07:17 -08:00
fmalita
1a481fe4bf
[SkSVGDevice] Initial clipping support
...
Implement SVG clips based on clip stack flattening -
which is now exposed in SkClipStack::asPath() and shared
with SkCanvas's simplify-clip code.
R=reed@google.com ,mtklein@google.com
Review URL: https://codereview.chromium.org/876923003
2015-02-04 07:39:34 -08:00
egdaniel
4dce32c466
Revert "Move DstCopy on gpu into the GrXferProcessor."
...
This reverts commit 74a1175360
.
TBR=joshualitt@google.com ,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/3e9dfdb3784c0cbfecf7589a74aa9aff7ef40abd
Review URL: https://codereview.chromium.org/896163003
2015-02-04 06:25:28 -08:00
egdaniel
7adb355594
Revert of Revert "Move DstCopy on gpu into the GrXferProcessor." (patchset #1 id:1 of https://codereview.chromium.org/896163003/ )
...
Reason for revert:
failed on my manual revert
Original issue's description:
> Revert "Move DstCopy on gpu into the GrXferProcessor."
>
> This reverts commit 74a1175360
.
>
> TBR=joshualitt@google.com ,bsalomon@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3e9dfdb3784c0cbfecf7589a74aa9aff7ef40abd
TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/900913002
2015-02-04 06:20:25 -08:00
egdaniel
3e9dfdb378
Revert "Move DstCopy on gpu into the GrXferProcessor."
...
This reverts commit 74a1175360
.
TBR=joshualitt@google.com ,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/896163003
2015-02-04 06:14:22 -08:00
kkinnunen
2340dcb02c
Remove unused and unimplemented abstract functions from GrRenderTarget
...
Remove unused and unimplemented abstract functions from GrRenderTarget.
The functions might cause confusion later.
BUG=skia:3388
Review URL: https://codereview.chromium.org/865603007
2015-02-03 22:20:19 -08:00
fmalita
fe3f260ff9
[SkSVGDevice] Initial text support
...
R=reed@google.com ,mtklein@google.com
Review URL: https://codereview.chromium.org/899683002
2015-02-03 17:47:12 -08:00
egdaniel
74a1175360
Move DstCopy on gpu into the GrXferProcessor.
...
BUG=skia:
Review URL: https://codereview.chromium.org/885923002
2015-02-03 15:02:43 -08:00
mtklein
7b274c78fb
Port SkRefCnt.h to new SkAtomics.h
...
This adds sk_memory_barrier(), implemented using sk_atomic_fetch_add() on an uninitialized variable. If that becomes a problem we can drop this to the porting layer, using std::atomic_thread_fence() / __atomic_thread_fence() / __sync_synchronize().
The big win is that ref() doesn't generate a memory barrier any more on ARM.
This is an instance of SkSafeRef() in SkPaint(const SkPaint&) after this CL:
4d0: 684a ldr r2, [r1, #4 ]
4d2: 6018 str r0, [r3, #0 ]
4d4: b13a cbz r2, 4e6 <_ZN7SkPaintC1ERKS_+0x2e>
4d6: 1d10 adds r0, r2, #4
4d8: e850 4f00 ldrex r4, [r0]
4dc: 3401 adds r4, #1
4de: e840 4500 strex r5, r4, [r0]
4e2: 2d00 cmp r5, #0
4e4: d1f8 bne.n 4d8 <_ZN7SkPaintC1ERKS_+0x20>
Here's the before, pretty much the same with two memory barriers surrounding the ref():
4d8: 684a ldr r2, [r1, #4 ]
4da: 6018 str r0, [r3, #0 ]
4dc: b15a cbz r2, 4f6 <_ZN7SkPaintC1ERKS_+0x3e>
4de: 1d10 adds r0, r2, #4
4e0: f3bf 8f5f dmb sy
4e4: e850 4f00 ldrex r4, [r0]
4e8: 3401 adds r4, #1
4ea: e840 4500 strex r5, r4, [r0]
4ee: 2d00 cmp r5, #0
4f0: d1f8 bne.n 4e4 <_ZN7SkPaintC1ERKS_+0x2c>
4f2: f3bf 8f5f dmb sy
The miscellaneous files in here are just fixups to explicitly include SkMutex.h,
instead of leeching it off SkRefCnt.h.
No public API changes.
TBR=reed@google.com
Build trybots seem hosed.
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/896803002
2015-02-03 13:38:58 -08:00
mtklein
b9eb4ac0f1
patch from issue 886233004 at patchset 40001 ( http://crrev.com/886233004#ps40001 )
...
... with changes proposed in the review.
BUG=skia:
Review URL: https://codereview.chromium.org/894013002
2015-02-02 18:26:03 -08:00
bsalomon
563ff60b33
make getContentKey() available in GrGpuResource public interface
...
TBR=robertphillips@google.com
Committed: https://skia.googlesource.com/skia/+/85ed2db092e75db41b711b9116a8d5b465fc2b0c
Review URL: https://codereview.chromium.org/886313005
2015-02-02 17:25:26 -08:00
stephana
9b440260d5
Revert of make getContentKey() available in GrGpuResource public interface (patchset #2 id:20001 of https://codereview.chromium.org/886313005/ )
...
Reason for revert:
This causes in one case the linker and in the other the compiler to segfault. On
Test-Ubuntu12-ShuttleA-GTX660-x86_64-Debug/Release
Original issue's description:
> make getContentKey() available in GrGpuResource public interface
>
> TBR=robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/85ed2db092e75db41b711b9116a8d5b465fc2b0c
TBR=robertphillips@google.com ,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/864343005
2015-02-02 14:52:11 -08:00
bsalomon
85ed2db092
make getContentKey() available in GrGpuResource public interface
...
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/886313005
2015-02-02 14:08:09 -08:00
mtklein
e67164d9b3
DM: wire up --leaks / -l again
...
No public API changes.
TBR=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/893043002
2015-02-02 13:24:37 -08:00
bsalomon
37f9a2694c
Move npot resizing out of GrContext and simplify GrContext texture functions.
...
Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54
Committed: https://skia.googlesource.com/skia/+/6c96672491b04cb782bce8fee778124df66524a0
Review URL: https://codereview.chromium.org/882223003
2015-02-02 13:00:10 -08:00
mtklein
a669bc7a7a
Atomics overhaul.
...
This merges and refactors SkAtomics.h and SkBarriers.h into SkAtomics.h and
some ports/ implementations. The major new feature is that we can express
memory orders explicitly rather than only through comments.
The porting layer is reduced to four template functions:
- sk_atomic_load
- sk_atomic_store
- sk_atomic_fetch_add
- sk_atomic_compare_exchange
From those four we can reconstruct all our previous sk_atomic_foo.
There are three ports:
- SkAtomics_std: uses C++11 <atomic>, used with MSVC
- SkAtomics_atomic: uses newer GCC/Clang intrinsics, used on not-MSVC where possible
- SkAtomics_sync: uses older GCC/Clang intrinsics, used where SkAtomics_atomic not supported
No public API changes.
TBR=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/896553002
2015-02-02 12:22:07 -08:00
fmalita
3d91aad293
Disable LCD text when rasterizing SkPictureShader tiles.
...
BUG=chromium:453299
R=reed@google.com
Review URL: https://codereview.chromium.org/884163003
2015-02-02 05:25:04 -08:00
bsalomon
e137db8569
Revert of Move npot resizing out of GrContext and simplify GrContext texture functions. (patchset #10 id:200001 of https://codereview.chromium.org/882223003/ )
...
Reason for revert:
perf fix didn't fix the cr webgl conformance tests
Original issue's description:
> Move npot resizing out of GrContext and simplify GrContext texture functions.
>
> Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54
>
> Committed: https://skia.googlesource.com/skia/+/6c96672491b04cb782bce8fee778124df66524a0
TBR=robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/887303002
2015-01-31 20:10:56 -08:00
bsalomon
6c96672491
Move npot resizing out of GrContext and simplify GrContext texture functions.
...
Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54
Review URL: https://codereview.chromium.org/882223003
2015-01-31 19:27:53 -08:00
fmalita
6bfef2dfec
Revert of Move npot resizing out of GrContext and simplify GrContext texture functions. (patchset #9 id:160001 of https://codereview.chromium.org/882223003/ )
...
Reason for revert:
webGL conformance failures:
WebglConformance.conformance_textures_tex_image_and_sub_image_2d_with_video
WebglConformance.conformance_textures_texture_npot_video
https://codereview.chromium.org/892773003/
http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/29272
Original issue's description:
> Move npot resizing out of GrContext and simplify GrContext texture functions.
>
> Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54
TBR=robertphillips@google.com ,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/868233005
2015-01-31 07:02:18 -08:00
reed
418149250a
export SkImageInfo
...
BUG=skia:
Review URL: https://codereview.chromium.org/893603005
2015-01-30 14:54:38 -08:00
scroggo
e7ea40f4e0
Reland "remove unused SkAvoidXfermode"
...
(patchset #2 id:20001 of https://codereview.chromium.org/860583002/ )
SkAvoidXfermode has been moved into Android, so it is safe to remove.
Review URL: https://codereview.chromium.org/890893003
2015-01-30 13:16:02 -08:00
brucedawson
aea85dc3d3
Disable the noisiest /analyze warning in Chrome. ~3,700/12,000
...
Decades ago Intel decided that the bsr (Bit Scan Reverse) instruction
should have undefined results if its argument is zero. This probably
makes the instruction harder to implement and it definitely makes it
more difficult to use.
In SkCLZ_portable it requires a check for a zero argument, but despite
that check /analyze still warns that _BitScanReverse might fail
(because it doesn't know what can cause failures). Because this warning
occurs in a frequently included header file it ends up being very noisy,
accounting for ~30% of all warnings (before deduplication).
Suppressing this useless warning will make the raw results easier to
look through.
Review URL: https://codereview.chromium.org/872673007
2015-01-30 12:57:50 -08:00
bsalomon
8a81003491
Move npot resizing out of GrContext and simplify GrContext texture functions.
...
Review URL: https://codereview.chromium.org/882223003
2015-01-30 12:43:44 -08:00
caryclark
c8fcafb3f0
First cut at cleaning up Sergio's example code and moving some common code to SkWindow.
...
Eventually, this will be moved to be a peer of SampleApp so it is compiled by the bots to avoid future bit rot.
Also ignore XCode auto-generated flag in CommandLineFlags, and remove the unused multiple-example part.
Review URL: https://codereview.chromium.org/890873003
2015-01-30 12:37:02 -08:00
scroggo
1872ad0fe9
Remove unused globalRef/globalUnref.
...
BUG=skia:1482
Review URL: https://codereview.chromium.org/887993003
2015-01-30 07:34:48 -08:00
scroggo
5d2fd4465b
Remove unused hasLocalMatrix.
...
This method is not called anywhere on Android or Chrome, and it
has a FIXME that it may not be correct.
A client can still getLocalMatrix().isIdentity() if they need this
information. (It has the same FIXME, and perhaps we should revisit
it. In the meantime, this convenience method is not needed.)
Review URL: https://codereview.chromium.org/882443007
2015-01-30 07:14:04 -08:00
scroggo
527b28732d
Update comment for SkMallocPixelRef::NewWithProc.
...
Add a comment about using a NULL ReleaseProc.
BUG=skia:2185
Review URL: https://codereview.chromium.org/885573005
2015-01-29 13:52:13 -08:00
reed
c778904a5b
share code between arcTo and addArc, update dox
...
BUG=skia:
Review URL: https://codereview.chromium.org/863123005
2015-01-29 12:59:11 -08:00
mtklein
4f358fc269
Make SkWriter32::snapshotAsData() a dumb copy.
...
SkWriter32::snapshotAsData() is no longer performance critical.
It's only used when we're serializing to disk.
BUG=skia:2289
Review URL: https://codereview.chromium.org/875403005
2015-01-29 12:03:53 -08:00
scroggo
648238cc90
Remove SkProxyCanvas.
...
SkProxyCanvas is redundant with SkNWayCanvas, and means another class
we have to keep in sync with the SkCanvas interface.
Remove tests which use an SkProxyCanvas.
Requires a change to chromium.
BUG=skia:3279
BUG=skia:500
Review URL: https://codereview.chromium.org/886813002
2015-01-29 11:58:51 -08:00
bsalomon
3bd12efdcf
Fix wrapped content keys for npot textures.
...
Review URL: https://codereview.chromium.org/879193002
2015-01-28 11:39:48 -08:00
senorblanco
772604c214
Add a flag to flush the canvases during SkMultiPictureDraw::draw().
...
This is necessary for multisampling, so that each multisampled render
target resolves before Chrome's compositor attempts to draw the
texture.
BUG=skia:
Review URL: https://codereview.chromium.org/878653004
2015-01-28 11:01:06 -08:00
fmalita
3dc40ac9f9
Conservative SkTextBlob bounds.
...
Compute cheaper/more conservative text blob bounds based on the typeface
maximum glyph bbox.
BUG=chromium:451401
R=reed@google.com ,bungeman@google.com
Review URL: https://codereview.chromium.org/886473002
2015-01-28 10:56:06 -08:00
bsalomon
e167f9660c
Fix GPU resource cache related assertions.
...
Review URL: https://codereview.chromium.org/879963003
2015-01-27 09:56:04 -08:00
bungeman
5f213d9627
SkTypeface to use SkStreamAsset.
...
SkTypeface already requires typeface streams to support SkStreamAsset
in practice, and in practice all users are already supplying them.
Review URL: https://codereview.chromium.org/869763002
2015-01-27 05:39:10 -08:00
robertphillips
0a482f4414
Fix Chrome build
...
Switch SkShader's toString method to not be pure virtual due to derived classes in Chromium
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/875043002
2015-01-26 07:00:05 -08:00
robertphillips
42dbfa8651
Add patheffects to debugger printout
...
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/872043002
2015-01-26 06:08:52 -08:00
reed
96a857ef5a
initial preroll api
...
BUG=skia:
Review URL: https://codereview.chromium.org/855473002
2015-01-25 10:33:58 -08:00
bsalomon
63c992f6c0
Fix the speeling of "purgeable" in Gr code
...
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/874693002
2015-01-23 12:47:59 -08:00
bsalomon
a3ca15c314
Remove deprecated SkSurface::NewRenderTarget factories
...
Review URL: https://codereview.chromium.org/837723008
2015-01-23 11:02:50 -08:00
bsalomon
eaaaf0b16c
Take budgeted param when snapping new image.
...
Review URL: https://codereview.chromium.org/872543002
2015-01-23 08:08:04 -08:00
bsalomon
c2f35b750a
Allow unbudgeted resources to be recycled by the cache as scratch.
...
Review URL: https://codereview.chromium.org/870743002
2015-01-23 07:19:22 -08:00
bsalomon
4dffede04a
Fix self assigment in GrResourceKey
...
TBR=robertphillips@google.com
BUG=skia:3340
Review URL: https://codereview.chromium.org/866263007
2015-01-23 07:17:55 -08:00
bsalomon
1ea1ebce10
Remove GrBinHashKey
...
Review URL: https://codereview.chromium.org/861323002
2015-01-23 06:46:16 -08:00
reed
f803da12cf
add newImage API
...
BUG=skia:3277
related bug: skbug.com/3276
Review URL: https://codereview.chromium.org/821083002
2015-01-23 05:58:07 -08:00
bsalomon
24db3b1c35
Add specialized content key class for resources.
...
Review URL: https://codereview.chromium.org/858123002
2015-01-23 04:24:05 -08:00
egdaniel
8dd688b756
Rename GrOptDrawState to GrPipeline and GrDrawState to GrPipelineBuilder
...
BUG=skia:
Review URL: https://codereview.chromium.org/858343002
2015-01-22 10:16:09 -08:00
reed
b0dfb546f5
remove (unused) GatherPixelRefs
...
BUG=skia:
Review URL: https://codereview.chromium.org/869463002
2015-01-22 09:03:25 -08:00
bungeman
44af7ba4bc
Fix SkIStream nits.
...
Fix comment, constness of one field, and delete already checks for NULL.
TBR=reed@google.com
Trivial change to debatably public api.
Review URL: https://codereview.chromium.org/868643003
2015-01-22 07:33:51 -08:00
joshualitt
2fdeda0498
XPFactory lazily initializie in drawstate / GrPaint
...
BUG=skia:
Review URL: https://codereview.chromium.org/866573002
2015-01-22 07:11:45 -08:00
egdaniel
dcfb7cf336
Remove the need for asCoeff in SkXfermode.
...
BUG=skia:
Review URL: https://codereview.chromium.org/864833002
2015-01-22 06:52:29 -08:00
bungeman
2dca817edb
Remove staging SkStream::unref().
...
SkStream::unref() was added to ease transitioning off of SkStream
deriving from SkRefCnt. It is no longer needed, remove it.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/861413002
2015-01-22 06:08:31 -08:00
mtklein
a64c48f4f9
Move sync code to include/, switch from using platform define to a proxy header in core/
...
This fixes two problems:
1) #include SK_SOME_DEFINE doesn't work well for all our clients.
2) Things in include/ are #including things in src/, which we don't like.
TBR=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/862983002
2015-01-21 13:13:31 -08:00
scroggo
a1193e4b0e
Make SkStream *not* ref counted.
...
SkStream is a stateful object, so it does not make sense for it to have
multiple owners. Make SkStream inherit directly from SkNoncopyable.
Update methods which previously called SkStream::ref() (e.g.
SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(),
which required the existing owners to call SkStream::unref()) to take
ownership of their SkStream parameters and delete when done (including
on failure).
Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some
cases this means heap allocating streams that were previously stack
allocated.
Respect ownership rules of SkTypeface::CreateFromStream() and
SkImageDecoder::buildTileIndex().
Update the comments for exceptional methods which do not affect the
ownership of their SkStream parameters (e.g.
SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be
explicit about ownership.
Remove test_stream_life, which tested that buildTileIndex() behaved
correctly when SkStream was a ref counted object. The test does not
make sense now that it is not.
In SkPDFStream, remove the SkMemoryStream member. Instead of using it,
create a new SkMemoryStream to pass to fDataStream (which is now an
SkAutoTDelete).
Make other pdf rasterizers behave like SkPDFDocumentToBitmap.
SkPDFDocumentToBitmap delete the SkStream, so do the same in the
following pdf rasterizers:
SkPopplerRasterizePDF
SkNativeRasterizePDF
SkNoRasterizePDF
Requires a change to Android, which currently treats SkStreams as ref
counted objects.
Review URL: https://codereview.chromium.org/849103004
2015-01-21 12:09:53 -08:00
bsalomon
1c60dfe7ca
Reland https://codereview.chromium.org/860333002 with fix for test failures.
...
Revert "Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 id:1 of https://codereview.chromium.org/860333002/ )"
This reverts commit 988018c817
.
BUG=skia:
Review URL: https://codereview.chromium.org/863983003
2015-01-21 09:32:40 -08:00
mtklein
988018c817
Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 id:1 of https://codereview.chromium.org/860333002/ )
...
Reason for revert:
Our Valgrind bot just spewed out a weird error. I don't know if it's related, but it looks at least like one of the stacks was in the right area, so I'm going to revert this precautionarily. Sorry if this is a false positive.
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/266/steps/dm/logs/stdio
Original issue's description:
> Make GrScratchKey memory buffer correct size on copy
>
> Scratch key memory buffer of a copy of a key was too big. The (new) copy
> was N times uint32_t bytes instead of N bytes.
>
> Adds few tests to resource cache. These tests would not catch the too
> big buffer. This is just a precaution for too small buffers. The main
> idea of the test change is that the scratch key should contain some
> information, so that lookup with a scratch key can also return no
> match. Otherwise testing of scratch lookup result is not indicative of
> correct code (eg. no-information scratch key will always match).
>
> Committed: https://skia.googlesource.com/skia/+/711ef4831363fb8cbdf061dc2c36c65b13c0ccf2
TBR=bsalomon@google.com ,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/864833003
2015-01-21 08:05:55 -08:00
kkinnunen
711ef48313
Make GrScratchKey memory buffer correct size on copy
...
Scratch key memory buffer of a copy of a key was too big. The (new) copy
was N times uint32_t bytes instead of N bytes.
Adds few tests to resource cache. These tests would not catch the too
big buffer. This is just a precaution for too small buffers. The main
idea of the test change is that the scratch key should contain some
information, so that lookup with a scratch key can also return no
match. Otherwise testing of scratch lookup result is not indicative of
correct code (eg. no-information scratch key will always match).
Review URL: https://codereview.chromium.org/860333002
2015-01-21 06:39:14 -08:00
reed
3f43f8ab9c
remove dead SkPersp macros
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/864713002
2015-01-20 19:58:36 -08:00
egdaniel
58136167fc
Do more cleanup from xp changes
...
BUG=skia:
Review URL: https://codereview.chromium.org/811903004
2015-01-20 10:19:22 -08:00
egdaniel
71e236c03e
Remove willReadDst from GrFragmentProcessor.
...
Since only XP's can read dst now, there is no reason to have this query on GrFP.
This also triggered a chain reaction of cleaning up/removing unnecessary code
elsewhere.
BUG=skia:
Review URL: https://codereview.chromium.org/851143003
2015-01-20 06:34:51 -08:00
scroggo
b2b416d384
Revert of remove unused SkAvoidXfermode (patchset #2 id:20001 of https://codereview.chromium.org/860583002/ )
...
Reason for revert:
Breaking Android framework build, which still uses AvoidXfermode. (failure shown here: 565b76b4bd/logs/build_error.log
)
Here is the Java class that uses it: https://cs.corp.google.com/#android/frameworks/base/graphics/java/android/graphics/AvoidXfermode.java&sq=package:android
It has been deprecated. The glue code (which actually references the Skia file) is here: https://cs.corp.google.com/#android/frameworks/base/core/jni/android/graphics/Xfermode.cpp&q=Xfermode.cpp&sq=package:android
Mike suggested we move the implementation into Android, which is fine with me.
Original issue's description:
> remove unused SkAvoidXfermode
>
> BUG=skia:
> TBR=
> NOTRY=True
>
> Committed: https://skia.googlesource.com/skia/+/2d02df7a9a50217dac8c1d11681832a927ed79ce
TBR=bsalomon@google.com ,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/822953003
2015-01-20 06:33:14 -08:00
weiliangc
07f26976f7
Remove unused TileGridInfo
...
Chromium no longer uses TileGridInfo as of CL 856853003 and remove this
from skia.
BUG=chromium:447662
Review URL: https://codereview.chromium.org/828503004
2015-01-20 05:57:06 -08:00
reed
2d02df7a9a
remove unused SkAvoidXfermode
...
BUG=skia:
TBR=
NOTRY=True
Review URL: https://codereview.chromium.org/860583002
2015-01-18 20:01:30 -08:00
robertphillips
46d36f0e7b
Refactor position computation to enable device space "nudge"
...
To match raster's handling of BW geometry we want to be able to perform a device space "nudge" on all geometry. This CL sets us up to be able to do that in GrGLVertexBuilder::transformToNormalizedDeviceSpace.
BUG=423834
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/854013002
2015-01-18 08:14:14 -08:00
reed
7729e56a29
use log2(scale) to compute mip level
...
now w/ expanded suppressions
This reverts commit b50ced7030
.
BUG=skia:
TBR=
NOTRY=True
NOTREECHECKS=True
Review URL: https://codereview.chromium.org/856723003
2015-01-16 08:35:09 -08:00
bsalomon
afe3005be3
Require budget decision when creating a RenderTarget SkSurface.
...
Restructure SkGpuDevice creation:
*SkSurfaceProps are optional.
*Use SkSurfaceProps to communicate DF text rather than a flag.
*Tell SkGpuDevice::Create whether RT comes from cache or not.
Review URL: https://codereview.chromium.org/848903004
2015-01-16 07:32:33 -08:00
reed
b50ced7030
Revert of use log2(scale) to compute mip level (patchset #7 id:120001 of https://codereview.chromium.org/849333002/ )
...
Reason for revert:
need more suppressions
Original issue's description:
> use log2(scale) to compute mip level
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/15fd47f8a07615a7f5d78581aee4c80ff9f17fd9
TBR=robertphillips@google.com ,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/856783004
2015-01-16 07:27:46 -08:00
reed
15fd47f8a0
use log2(scale) to compute mip level
...
BUG=skia:
Review URL: https://codereview.chromium.org/849333002
2015-01-16 07:18:10 -08:00
egdaniel
54f0e9d784
Add Xfer Processor for GrCustomXfermodes
...
BUG=skia:
Review URL: https://codereview.chromium.org/852203003
2015-01-16 06:29:47 -08:00
egdaniel
0063a9b69a
Move XferEffects class to GrCustomXfermode file
...
BUG=skia:
Review URL: https://codereview.chromium.org/844913003
2015-01-15 10:52:32 -08:00
bsalomon
5236cf480d
Make uncached textures uncached from the get go.
...
This avoids the problem of a newly created uncached texture causing a purge of cached resources.
BUG=chromium:445885
Review URL: https://codereview.chromium.org/846303002
2015-01-14 10:42:08 -08:00
egdaniel
38cd055215
Do some minor pre cleanup work before converting all xfermodes to XPs.
...
BUG=skia:
Review URL: https://codereview.chromium.org/853543003
2015-01-14 08:05:11 -08:00
mtklein
3f915c0c9a
upstream google3 include paths for jsoncpp
...
BUG=skia:
No public API changes
TBR=reed@google.com
Review URL: https://codereview.chromium.org/853613002
2015-01-14 05:02:39 -08:00
joshualitt
abb52a1a70
Move most of the transform logic into the primitive processors
...
BUG=skia:
Review URL: https://codereview.chromium.org/822423004
2015-01-13 15:02:10 -08:00
reed
a7f11918d9
rename blitrow::proc and add (uncalled) hook for colorproc16
...
BUG=skia:3302
Review URL: https://codereview.chromium.org/847443003
2015-01-13 13:51:00 -08:00
mtklein
e55fb177e9
Allow -DGOOGLE3 to bypass our normal platform intrinsic dispatch.
...
The current code that pound-includes another define doesn't seem to be working there.
BUG=skia:
No API changes.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/820643005
2015-01-13 13:27:26 -08:00
mtklein
199ba8e19b
namespace {} trick for SK_DECLARE_STATIC_ONCE
...
Like all our other SK_DECLARE_STATIC_*, it's usually not a thread-safe
thing to put inside a function. Adding namespace {} prevents that
syntactically.
Needs https://codereview.chromium.org/841263004/ to land first.
BUG=chromium:447890
No public API changes.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/806473006
2015-01-13 08:40:23 -08:00
mtklein
6f07665768
Simplify SkInstCnt
...
This code requires fewer macros to use it (just one), has less code in macro
definitions, and has simpler synchronization code (just atomic ints, no SkOnce,
no SkMutex, etc.)
A minor downside, we lose indentation and reverse-ordering in the final report:
Leaked SkRefCntBase: 7
Leaked SkFontMgr: 1
Leaked SkWeakRefCnt: 1
Leaked SkTypeface: 1
Leaked SkFlattenable: 3
Leaked SkXfermode: 3
Leaked SkPathRef: 1
Leaked SkPixelRef: 1
Leaked SkMallocPixelRef: 1
becomes
Leaked SkXfermode: 3
Leaked SkMallocPixelRef: 1
Leaked SkPixelRef: 1
Leaked SkPathRef: 1
Leaked SkFlattenable: 3
Leaked SkTypeface: 1
Leaked SkWeakRefCnt: 1
Leaked SkFontMgr: 1
Leaked SkRefCntBase: 7
This is motivated by wanting to land https://codereview.chromium.org/806473006/ ,
which makes sure all static use of SkOnce are in global scope. The current
implementation of SkInstCnt uses them in function scope, which isn't safe.
BUG=skia:
No public API changes.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/841263004
2015-01-13 08:22:44 -08:00
reed
4ef0c8aea2
remove NewTexture?
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/831323005
2015-01-13 04:00:55 -08:00
reed
f5872d2f41
add stroke params to c api
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/848553002
2015-01-10 17:59:31 -08:00
reed
0846f1b1c4
remove (dead) SK_SUPPORT_LEGACY_DRAWDATA and SK_SUPPORT_LEGACY_CANVAS_VIRTUAL
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/844053002
2015-01-09 14:17:40 -08:00
mtklein
72c9faab45
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
2015-01-09 10:06:40 -08:00
mtklein
703dd2ed18
Remove SkTileGrid (except for TileGridInfo).
...
TBR=reed@google.com
BUG=skia:3085
Review URL: https://codereview.chromium.org/845623002
2015-01-09 06:41:48 -08:00
reed
281ecc27ee
need to rebaseline (changed) c_gms, update dox
...
BUG=skia:
TBR=
NOTRY=True
Review URL: https://codereview.chromium.org/844663002
2015-01-07 18:20:16 -08:00
reed
5965c8ae4e
add ImageGenerator::NewFromData to porting layer
...
BUG=skia:3275
Review URL: https://codereview.chromium.org/834633006
2015-01-07 18:04:45 -08:00
sugoi
23d432080c
Adding check on input count
...
An integer overflow is causing a memory allocation to succeed while it should fail for being too large.
BUG=445810
Review URL: https://codereview.chromium.org/831583004
2015-01-07 13:28:08 -08:00
robertphillips
f4e5995ac7
It is dangerous to ignore SkRect::intersect's return value
...
Committed: https://skia.googlesource.com/skia/+/152f524fd325b7776b01f84afbfe2fa071648a05
Review URL: https://codereview.chromium.org/833943002
2015-01-07 12:16:10 -08:00
robertphillips
690fc594f1
Revert of It is dangerous to ignore SkRect::intersect's return value (patchset #6 id:100001 of https://codereview.chromium.org/833943002/ )
...
Reason for revert:
Still more Chromium clean up to do
Original issue's description:
> It is dangerous to ignore SkRect::intersect's return value
>
> Committed: https://skia.googlesource.com/skia/+/152f524fd325b7776b01f84afbfe2fa071648a05
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/825983005
2015-01-07 09:12:43 -08:00
mtklein
7e44bb1916
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
2015-01-07 09:06:08 -08:00
robertphillips
152f524fd3
It is dangerous to ignore SkRect::intersect's return value
...
Review URL: https://codereview.chromium.org/833943002
2015-01-07 09:01:13 -08:00
caryclark
ac8d8b8f13
revert buildbot breaker
...
Hals's change broke a buildbot has shown here
http://build.chromium.org/p/client.skia/builders/Test-Win7-ShuttleA-HD2000-x86-Release/builds/510/steps/gm/logs/stdio
Got unknown flag "--useDocumentInsteadOfDevice". Exiting.
TBR=halcanary
Review URL: https://codereview.chromium.org/832183006
2015-01-07 07:36:52 -08:00
robertphillips
783fe16b8e
Rename SkDrawPictureCallback to SkPicture::AbortCallback
...
Committed: https://skia.googlesource.com/skia/+/7ef197255deb4e2fa64c03c7130d56ddf164e83c
Review URL: https://codereview.chromium.org/829983003
2015-01-07 07:28:41 -08:00
reed
8ea6dabbb1
Revert of Rename SkDrawPictureCallback to SkPicture::AbortCallback (patchset #2 id:20001 of https://codereview.chromium.org/829983003/ )
...
Reason for revert:
speculative revert to unblock DEPS roll
Original issue's description:
> Rename SkDrawPictureCallback to SkPicture::AbortCallback
>
> Committed: https://skia.googlesource.com/skia/+/7ef197255deb4e2fa64c03c7130d56ddf164e83c
TBR=reed@google.com ,robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/824013004
2015-01-06 16:15:25 -08:00
halcanary
66b29a6ad5
Remove SkPDFDocument and SkPDFDevice from the public headers.
...
Committed: https://skia.googlesource.com/skia/+/8b1f761365df6652ea9304b6572d2dd91917b9aa
Review URL: https://codereview.chromium.org/841533002
2015-01-06 15:13:49 -08:00
robertphillips
7ef197255d
Rename SkDrawPictureCallback to SkPicture::AbortCallback
...
Review URL: https://codereview.chromium.org/829983003
2015-01-06 12:26:08 -08:00
reed
b5d818ab04
will write a custom one for blink later
...
BUG=skia:
TBR=
NOTRY=True
Review URL: https://codereview.chromium.org/810603003
2015-01-06 11:30:45 -08:00
reed
efdac514a9
Revert "Remove SkPDFDocument and SkPDFDevice from the public headers."
...
This reverts commit 8b1f761365
.
BUG=skia:
TBR=
NOTRY=True
NOTREECHECKS=True
Review URL: https://codereview.chromium.org/839603002
2015-01-06 09:54:14 -08:00
halcanary
8b1f761365
Remove SkPDFDocument and SkPDFDevice from the public headers.
...
Review URL: https://codereview.chromium.org/841533002
2015-01-06 09:30:10 -08:00
robertphillips
2b6ab61e22
Remove SkPath::asRect
...
AFAICT the asRect entry point is not needed.
Greg: GPU
Reed: API
Cary: Path
Review URL: https://codereview.chromium.org/833193002
2015-01-05 12:22:14 -08:00
robertphillips
91b0a35873
Cleanup isRect variants
...
Review URL: https://codereview.chromium.org/832083002
2015-01-05 10:13:46 -08:00
reed
41af966ab3
Revert of Revert of move remaining virtual draw methods to onDraw (patchset #1 id:1 of https://codereview.chromium.org/835913002/ )
...
Reason for revert:
test to see if it wasn't this CL that broke chromeos
Original issue's description:
> Revert of move remaining virtual draw methods to onDraw (patchset #5 id:80001 of https://codereview.chromium.org/817723005/ )
>
> Reason for revert:
> did this cause chromeos heap corruption on skp?
>
> Original issue's description:
> > move remaining virtual draw methods to onDraw
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/2e0f7d53bba5438c9bf11ee5ccae2c301e348419
>
> TBR=robertphillips@google.com ,djsollen@google.com,bsalomon@google.com,mtklein@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e87e383351e1547b21d96d02bcd0c3cbbe0837f1
TBR=robertphillips@google.com ,djsollen@google.com,bsalomon@google.com,mtklein@google.com,reed@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/831253002
2015-01-05 07:49:08 -08:00
reed
e87e383351
Revert of move remaining virtual draw methods to onDraw (patchset #5 id:80001 of https://codereview.chromium.org/817723005/ )
...
Reason for revert:
did this cause chromeos heap corruption on skp?
Original issue's description:
> move remaining virtual draw methods to onDraw
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2e0f7d53bba5438c9bf11ee5ccae2c301e348419
TBR=robertphillips@google.com ,djsollen@google.com,bsalomon@google.com,mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/835913002
2015-01-05 04:49:38 -08:00
reed
2e0f7d53bb
move remaining virtual draw methods to onDraw
...
BUG=skia:
Review URL: https://codereview.chromium.org/817723005
2015-01-04 21:09:04 -08:00
reed
f8d18743d4
add toString to SkImage
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/823013003
2015-01-02 20:45:37 -08:00
reed
c4fda92f45
remove unused drawData
...
BUG=skia:
Review URL: https://codereview.chromium.org/830083002
2015-01-02 06:39:51 -08:00
reed
b2497c2d94
change API contract: disallow zero-sized images or surfaces
...
BUG=skia:
Review URL: https://codereview.chromium.org/830033003
2014-12-31 12:31:43 -08:00
bsalomon
7775c85611
Add a simpler key type for scratch resource keys.
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/815833004
2014-12-30 12:50:52 -08:00
joshualitt
8059eb9f6e
Move ViewMatrix off of drawstate
...
BUG=skia:
Review URL: https://codereview.chromium.org/815553003
2014-12-29 15:10:07 -08:00
robertphillips
4f662e62cd
Update stroke path to use rect returned from isRect (to fix trailing moveTo bug)
...
This basically recreates what was done in:
https://codereview.chromium.org/16950021/ (add rect-output parameter to isRect, allowing us to return the correct bounds even if a rectagular path has a trailing moveTo) with the addition of GM representation
BUG=skia:247770
Review URL: https://codereview.chromium.org/834503002
2014-12-29 14:06:51 -08:00
joshualitt
40d4bd8daf
removing coord change matrices
...
BUG=skia:
Review URL: https://codereview.chromium.org/821243003
2014-12-29 09:04:40 -08:00
bsalomon
b0ae649b7e
Add device space skshader GM to test kDevice_GrCoordSet
...
Review URL: https://codereview.chromium.org/816003002
2014-12-29 07:05:27 -08:00
reed
b2a5d7e02f
add image-from-codec to c api
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/822203002
2014-12-25 14:16:21 -08:00
reed
0eafc9b06c
add maskfilter to c api
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/822053002
2014-12-23 14:11:11 -08:00
reed
e371989c92
add picture to c api
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/818153002
2014-12-22 17:46:00 -08:00
reed
0acf1b4b36
add private flag for sprite-as-bitmap
...
BUG=skia:3272
Review URL: https://codereview.chromium.org/806853005
2014-12-22 16:12:38 -08:00
joshualitt
8fc6c2d82c
This CL cleans up the last remaining users of localCoordChange on paint
...
NOTREECHECKS=True
BUG=skia:
Review URL: https://codereview.chromium.org/817853002
2014-12-22 15:27:05 -08:00
scroggo
16c8f14cd4
Remove last trace of SK_LEGACY_ENCODE_BITMAP
...
Review URL: https://codereview.chromium.org/819173002
2014-12-22 13:50:45 -08:00
reed
d990e2f14f
add testing flag to ignore saveLayer bounds
...
BUG=skia:
Review URL: https://codereview.chromium.org/819123003
2014-12-22 11:58:30 -08:00
jvanverth
fa1e8a7cef
Add sRGB texture support.
...
Review URL: https://codereview.chromium.org/791823003
2014-12-22 08:31:49 -08:00
reed
2d73d80d68
remove dead SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER code
...
BUG=skia:
Review URL: https://codereview.chromium.org/816273002
2014-12-22 07:37:29 -08:00
egdaniel
080e673b10
Add XP to handle the cases where we disable color write.
...
BUG=skia:
Review URL: https://codereview.chromium.org/787233003
2014-12-22 07:35:52 -08:00
reed
3b40ee6009
remove dead SK_SUPPORT_LEGACY_N32_NAME code
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/818903004
2014-12-21 14:29:05 -08:00
reed
f65f0b92f5
remove dead SK_SUPPORT_LEGACY_GRTYPES dead
...
BUG=skia:
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/823503002
2014-12-21 11:52:15 -08:00
reed
f7430ccfc0
removed dead SK_SUPPORT_LEGACY_DRAWTEXT_VIRTUAL code
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/817193002
2014-12-21 11:38:35 -08:00
reed
c8a21311e7
undef SK_SUPPORT_LEGACY_GRADIENT_FACTORIES to fix callers
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/824533002
2014-12-21 11:06:06 -08:00
reed
ec57b54ac7
remove dead SK_SUPPORT_LEGACY_DEVICE_CLEAR code
...
BUG=skia:
TBR=robertphilips@google.com
Review URL: https://codereview.chromium.org/807083003
2014-12-21 11:03:36 -08:00
tfarina
fa4f6cba2f
Cleanup: More override fixes - include version.
...
BUG=skia:3075
TEST=ninja -C out/Debug
TBR=reed@google.com
Review URL: https://codereview.chromium.org/800663003
2014-12-21 10:27:08 -08:00
reed
5e8b1688ee
remove dead SK_LEGACY_ENCODE_BITMAP flag
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/820903002
2014-12-20 15:23:55 -08:00
robertphillips
f3f5bad7de
Add toString methods to SkImageFilter-derived classes
...
This isn't definitive but at least makes something show up in the debugger.
Review URL: https://codereview.chromium.org/789163006
2014-12-19 13:49:15 -08:00
joshualitt
290c09b8bb
initial changes to add local matrix to primitive processor
...
BUG=skia:
Review URL: https://codereview.chromium.org/820523002
2014-12-19 13:45:20 -08:00
reed
53b9e2e0f2
add const to encodePixels pixel parameter
...
BUG=skia:
Review URL: https://codereview.chromium.org/788143007
2014-12-19 12:26:07 -08:00
scroggo
b64e56941c
Remove legacy Picture defines.
...
No longer needed by Android.
Review URL: https://codereview.chromium.org/788903006
2014-12-19 07:28:00 -08:00
joshualitt
c2625821b3
Remove the low hanging fruit with coord change matrices
...
BUG=skia:
Review URL: https://codereview.chromium.org/793013003
2014-12-18 16:40:55 -08:00
mtklein
8aacf20856
Fill SkRRect::fType proactively.
...
I found no external mentions of SkRRect::kUnknown_Type.
Motivating race found by TSAN:
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot/builds/48/steps/dm/logs/stdio
BUG=skia:
Review URL: https://codereview.chromium.org/801693003
2014-12-18 13:29:54 -08:00
reed
68331cd92a
remove dead code behind SK_SUPPORT_LEGACY_ALLOCPIXELS_BOOL
...
BUG=skia:
Review URL: https://codereview.chromium.org/814753004
2014-12-18 12:48:16 -08:00
egdaniel
9e4ecdc9f8
Add an InvariantOutput for the XPF.
...
The Invariant output holds information about final post blended color and other
general information like will it blend with dst. Having this new struct allowed
me to also remove some functions that were previously querying subsets of the
invariant output.
BUG=skia:
Review URL: https://codereview.chromium.org/814933002
2014-12-18 12:44:55 -08:00
bsalomon
309d4d5909
Remove GrCoordTransform::kPosition_CoordSet
...
Review URL: https://codereview.chromium.org/811373002
2014-12-18 10:17:45 -08:00
reed
a3cbc28e88
remove dead code for SK_SUPPORT_LEGACY_TEXTRENDERMODE
...
BUG=skia:
TBR=robertphilips
Review URL: https://codereview.chromium.org/812363002
2014-12-18 08:13:03 -08:00
joshualitt
16b2789895
Change to create device coord coordset
...
BUG=skia:
Review URL: https://codereview.chromium.org/812063002
2014-12-18 07:47:17 -08:00
joshualitt
5531d51ce7
remove view matrix from context
...
BUG=skia:
Review URL: https://codereview.chromium.org/808703006
2014-12-17 15:50:11 -08:00
bsalomon
3e79124a69
Stop creating GrODS for stencilPath commands.
...
Review URL: https://codereview.chromium.org/816513003
2014-12-17 13:43:13 -08:00
egdaniel
8750924a14
Add Coverage Drawing XP
...
BUG=skia:
Review URL: https://codereview.chromium.org/808813002
2014-12-17 13:37:13 -08:00
reed
220f926d9d
use conics
...
BUG=skia:
Review URL: https://codereview.chromium.org/455043002
2014-12-17 08:21:05 -08:00
reed
8b5752443f
add arcto patheffect
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/813513003
2014-12-17 01:47:32 -08:00
reed
a7a8b10134
add sample for arcTo
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/808793002
2014-12-16 08:07:43 -08:00
joshualitt
9b98932ada
This change will ultimately pull uniform color, and to a much lesser degree uniform coverage, into GPs. There are still some loose ends because drawstate has the ability to override the GP, but fixing these cleanly will have to wait until we have deferred geometry in place and can make attribute / uniform decisions on the fly.
...
BUG=skia:
Review URL: https://codereview.chromium.org/746423007
2014-12-15 14:16:27 -08:00
reed
0393912de7
pass dst-rect through from drawBitmapRect for better precision
...
BUG=skia:
Review URL: https://codereview.chromium.org/797963002
2014-12-15 13:42:51 -08:00
mtklein
0faaac6418
Look at DYNAMIC_ANNOTATIONS_ENABLED now.
...
Defining SK_DYNAMIC_ANNOTATIONS_ENABLED as 1 whenever DYNAMIC_ANNOTATIONS_ENABLED was 1
seems to be working fine for Chrome. Should be we can just use DYNAMIC_ANNOTATIONS_ENABLED.
BUG=skia:
Review URL: https://codereview.chromium.org/810513002
2014-12-15 13:38:07 -08:00
reed
8893e5f030
add paint::getFontBounds()
...
BUG=skia:
Review URL: https://codereview.chromium.org/804903006
2014-12-15 13:27:26 -08:00
scroggo
f9d610179d
There can be only one (SkRandom)!
...
Remove SkLCGRandom. We already decided the new one was better, which is
why we wrote the new SkRandom.
Convert GMs that were using SkLCGRandom to use the improved SkRandom.
Motivated by the fact that these GMs draw differently on some runs. We
believe this to be a result of using the old SkLCGRandom.
Add each of the tests that were using SkLCGRandom to ignore-tests.txt,
since we expect they'll draw differently using SkRandom.
Move a trimmed down version of SkLCGRandom into SkDiscretePathEffect.
In order to preserve the old behavior, trim down SkLCGRandom to only
the methods used by SkDiscretePathEffect, and hide it in
SkDiscretePathEffect's cpp file.
BUG=skia:3241
Review URL: https://codereview.chromium.org/805963002
2014-12-15 12:54:51 -08:00
egdaniel
54160f3286
Add xp optimization for RGB coverage.
...
This is needed since clearColorStages is being changed to ignore color input. For RGB coverage,
we want to clear all the color stages (since we know the final output color), but we don't want
to ignore the color input since it is needed.
In future we will change this so the XP stores the color internally and thus can tell the GP to
simiply ignore color.
BUG=skia:
Review URL: https://codereview.chromium.org/791933006
2014-12-15 12:38:53 -08:00
reed
5bcbe91304
Fix rrects that are large enough that we lose/gain a bit when we add the radius to a bounds coordinate.
...
add test that triggers assert in addRRect
BUG=skia:3239
Review URL: https://codereview.chromium.org/803153003
2014-12-15 12:28:33 -08:00
ehsan.akhgari
6f90475632
Rewrite NaN checks in terms of SkScalarIsNaN()
...
We are trying to replace Skia's NaN checker with our own in Mozilla,
so it would be nice to have to patch a single place by making sure
these NaN checks used SkScalarIsNaN().
BUG=skia:
Review URL: https://codereview.chromium.org/809443002
2014-12-15 12:08:47 -08:00
junov
3fcc125c77
Remove SkCanvas::isDrawingToLayer
...
BUG=3245
Review URL: https://codereview.chromium.org/803913005
2014-12-15 11:34:06 -08:00
reed
e05fed0d63
add dumpHex option to rect and rrect, to match path
...
BUG=skia:
Review URL: https://codereview.chromium.org/801383002
2014-12-15 07:59:53 -08:00
tfarina
912ed6ebb8
Cleanup: Mark some overridden methods with 'SK_OVERRIDE'.
...
This fixes errors like this:
../../include/gpu/effects/GrPorterDuffXferProcessor.h:27:25: error:
'name' overrides a member function but is not marked 'override'
[-Werror,-Winconsistent-missing-override]
BUG=skia:3075
TEST=ninja -C out/Debug skia_lib
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/804813002
2014-12-14 15:20:11 -08:00
reed
451e822705
add get9 and set9 to matrix, to aid in making keys
...
BUG=skia:
TBR=
NOTREECHECKS=True
Review URL: https://codereview.chromium.org/806543002
2014-12-13 08:46:49 -08:00
bsalomon
ef3fcd877a
More win64 warning fixes
...
Review URL: https://codereview.chromium.org/798723002
2014-12-12 08:51:39 -08:00
mtklein
f0f1411343
Cull pushCull and popCull from Skia.
...
These calls are unused and going away. Waiting on crrev.com/796083002.
BUG=skia:
Review URL: https://codereview.chromium.org/794263002
2014-12-12 08:46:25 -08:00
joshualitt
56995b5cc0
Remove GP from drawstate, revision of invariant output for GP
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/c6bc58eded89b0c0a36b8e20e193c200f297a0da
Review URL: https://codereview.chromium.org/791743003
2014-12-11 15:44:02 -08:00
junov
5756aff409
Adding a custom data field to GrGpuResource
...
Motivation: allow Blink to track pre-existing mailbox names for
textures that are recycled by the ganesh scratch texture pool.
BUG=440462
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/796163002
2014-12-11 14:59:32 -08:00
egdaniel
c230414861
Create xfer processor backend.
...
This includes:
-Having an actual XP stage at the end of the gl pipeline.
-All Blending work is handled by XP until actually setting GL blend states
-GLPrograms test to test XP
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/4dffc940c430eec66d4707490eace19c9b3f7904
Review URL: https://codereview.chromium.org/764643004
2014-12-11 13:15:14 -08:00
mtklein
1a4900e8be
Force embedding full font when serializing pictures.
...
We can't do this unconditionally or pipe will become stupidly slow.
DM's serialize mode fails subtly on Mac when we force embedding, so I've
#ifdef'd that away. Other platforms look fine.
BUG=skia:
Review URL: https://codereview.chromium.org/796523002
2014-12-11 11:06:00 -08:00
scroggo
895c43b28b
Replace EncodeBitmap with an interface.
...
Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().
Provides an implementation that supports the old version of
SkPicture::serialize().
TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
BUG=skia:3190
Review URL: https://codereview.chromium.org/784643002
2014-12-11 10:53:58 -08:00
junov
436293a330
Making GrGpuResource::release public for special case in Blink
...
BUG=440462
Review URL: https://codereview.chromium.org/739383006
2014-12-11 10:32:32 -08:00
reed
2ff1fcede1
Defer saves() until they're needed
...
patch from issue 759443006 at patchset 40001 (http://crrev.com/759443006#ps40001 )
BUG=skia:
Review URL: https://codereview.chromium.org/767333002
2014-12-11 07:07:38 -08:00
joshualitt
294738268d
Revert of Create xfer processor backend. (patchset #6 id:100001 of https://codereview.chromium.org/764643004/ )
...
Reason for revert:
CL breaks windows DM
Original issue's description:
> Create xfer processor backend.
>
> This includes:
> -Having an actual XP stage at the end of the gl pipeline.
> -All Blending work is handled by XP until actually setting GL blend states
> -GLPrograms test to test XP
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4dffc940c430eec66d4707490eace19c9b3f7904
TBR=bsalomon@google.com ,joshualitt@chromium.org,egdaniel@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/789343002
2014-12-10 15:03:01 -08:00
joshualitt
06f019fc0f
Revert of Fix to set correct output type when blending when we've read dst (patchset #4 id:60001 of https://codereview.chromium.org/791143002/ )
...
Reason for revert:
Breaks DM on windows
Original issue's description:
> Fix to set correct output type when blending when we've read dst
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/733fc2054044377e914559fa4f46db66ab7d9cea
TBR=bsalomon@google.com ,egdaniel@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/795783002
2014-12-10 14:57:50 -08:00
joshualitt
8c0f615fdd
Revert of Remove GP from drawstate, revision of invariant output for GP (patchset #9 id:160001 of https://codereview.chromium.org/791743003/ )
...
Reason for revert:
breaks mac
Original issue's description:
> Remove GP from drawstate, revision of invariant output for GP
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c6bc58eded89b0c0a36b8e20e193c200f297a0da
TBR=bsalomon@google.com ,egdaniel@google.com,joshualitt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/794843002
2014-12-10 14:12:22 -08:00
joshualitt
c6bc58eded
Remove GP from drawstate, revision of invariant output for GP
...
BUG=skia:
Review URL: https://codereview.chromium.org/791743003
2014-12-10 13:48:57 -08:00
egdaniel
733fc20540
Fix to set correct output type when blending when we've read dst
...
BUG=skia:
Review URL: https://codereview.chromium.org/791143002
2014-12-10 12:45:20 -08:00
mtklein
59f939eda6
Include SkTypes.h from SkDynamicAnnotations.h
...
This allows us to control SK_DYNAMIC_ANNOTATIONS_ENABLED by Sk*Config.h files.
This is a no-op today, because we control it from the compiler command line.
BUG=430815
Review URL: https://codereview.chromium.org/787003003
2014-12-10 10:49:42 -08:00
reed
96472deea7
dd readPixels to SkImage
...
patch from issue 789673007 at patchset 1 (http://crrev.com/789673007#ps1 )
BUG=skia:
Review URL: https://codereview.chromium.org/793723002
2014-12-10 09:53:42 -08:00
Florin Malita
c54d8db4d1
Remove SkCanvas::drawBitmapMatrix()
...
R=mtklein@google.com , reed@google.com , robertphillips@google.com
Review URL: https://codereview.chromium.org/789033002
2014-12-10 12:02:16 -05:00
egdaniel
4dffc940c4
Create xfer processor backend.
...
This includes:
-Having an actual XP stage at the end of the gl pipeline.
-All Blending work is handled by XP until actually setting GL blend states
-GLPrograms test to test XP
BUG=skia:
Review URL: https://codereview.chromium.org/764643004
2014-12-10 07:43:50 -08:00
reed
3054be16df
Remove canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul
...
patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001 )
BUG=skia:
TBR=
re-landing after chrome fixes have landed
Review URL: https://codereview.chromium.org/784223007
2014-12-10 07:24:28 -08:00
reed
7543aa2b36
add readPixels to SkSurface (later try to remove it from SkCanvas)
...
BUG=skia:
TBR=bsalomon, robertphilips
Review URL: https://codereview.chromium.org/789993002
2014-12-09 14:39:44 -08:00
reed
a8918a0650
Revert of remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul (patchset #3 id:40001 of https://codereview.chromium.org/790733003/ )
...
Reason for revert:
need to update chrome first
Original issue's description:
> remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul
>
> patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001 )
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2c1605a1fbaa2e35a27399a34254fb1200ec2ae6
TBR=fmalita@google.com ,fmalita@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/791763002
2014-12-09 13:55:20 -08:00
joshualitt
2e3b3e369d
This cl moves color and coverage off of drawstate. In an effort to keep this CL manageable, I have left the compute invariant input / output in a bit of a strange state(fixing this will be complicated).
...
In addition, NVPR makes this very complicated, and I haven't quite figured out a good way to handle it, so for now color and coverage DO live on optstate, but I will figure out some way to refactor that in future CLs.
BUG=skia:
Review URL: https://codereview.chromium.org/783763002
2014-12-09 13:31:15 -08:00
junov
f3c78ccf56
Adding an option for pixelated rendering in SkPictureImageFilter
...
BUG=skia:3209
Review URL: https://codereview.chromium.org/787073003
2014-12-09 13:07:22 -08:00
reed
2c1605a1fb
remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul
...
patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001 )
BUG=skia:
Review URL: https://codereview.chromium.org/790733003
2014-12-09 12:33:38 -08:00
reed
a8b326c01a
change SkPoint::setLength to set itself to (0,0) if it starting length is degenerate.
...
BUG=skia:3203
TBR=caryclark
Review URL: https://codereview.chromium.org/785933003
2014-12-09 11:50:33 -08:00
egdaniel
9513143efa
Make all blending up to GrOptDrawState be handled by the xp/xp factory.
...
In this cl the blending information is extracted for the xp and stored in the ODS
which is then used as it currently is. In the follow up cl, an XP backend will be added
and at that point all blending work will take place inside XP's.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/7c66342a399b529634bed0fabfaa562db2c0dbd4
Review URL: https://codereview.chromium.org/759713002
2014-12-09 11:15:44 -08:00
bsalomon
9f876a37d8
Use threshold of 1 texture coord value per pixel w/ nearest neighbor.
...
Review URL: https://codereview.chromium.org/787873002
2014-12-09 10:51:07 -08:00
egdaniel
309e346744
Rename CustomCoordTextureEffect to GrBitmapTextGeoProc.
...
Also add in explicit set for LCD text in invariantOutput.
BUG=skia:
Review URL: https://codereview.chromium.org/786293002
2014-12-09 10:35:58 -08:00
bsalomon
422f56f6e5
Make addUniform take a precision
...
Review URL: https://codereview.chromium.org/788733003
2014-12-09 10:18:12 -08:00
bsalomon
c0bd6484f6
Move shader precision out of GrShaderVar
...
Review URL: https://codereview.chromium.org/777443003
2014-12-09 10:04:14 -08:00
bsalomon
17168df779
Use texture size to determine precision of texture coord varyings.
...
Review URL: https://codereview.chromium.org/778783002
2014-12-09 09:00:49 -08:00
scroggo
3030445799
Revert of Replace EncodeBitmap with an interface. (patchset #12 id:210001 of https://codereview.chromium.org/784643002/ )
...
Reason for revert:
Failing serialization tasks in DM:
http://build.chromium.org/p/client.skia/builders/Test-Win8-ShuttleA-GTX660-x86-Debug/builds/352/steps/dm/logs/stdio
Original issue's description:
> Replace EncodeBitmap with an interface.
>
> Gives more flexibility to the caller to decide whether to use the
> encoded data returned by refEncodedData().
>
> Provides an implementation that supports the old version of
> SkPicture::serialize().
>
> TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
>
> BUG=skia:3190
>
> Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1
>
> Committed: https://skia.googlesource.com/skia/+/02b217f80b01a7dda8493422e5257c36a9ce8464
TBR=reed@google.com ,rmistry@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:3190
Review URL: https://codereview.chromium.org/783393004
2014-12-09 08:27:37 -08:00
scroggo
02b217f80b
Replace EncodeBitmap with an interface.
...
Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().
Provides an implementation that supports the old version of
SkPicture::serialize().
TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
BUG=skia:3190
Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1
Review URL: https://codereview.chromium.org/784643002
2014-12-09 07:44:36 -08:00
robertphillips
c0708cb7bc
Revert of Replace EncodeBitmap with an interface. (patchset #11 id:190001 of https://codereview.chromium.org/784643002/ )
...
Reason for revert:
Compilation is failing on some bots
Original issue's description:
> Replace EncodeBitmap with an interface.
>
> Gives more flexibility to the caller to decide whether to use the
> encoded data returned by refEncodedData().
>
> Provides an implementation that supports the old version of
> SkPicture::serialize().
>
> TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
>
> BUG=skia:3190
>
> Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1
TBR=reed@google.com ,scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:3190
Review URL: https://codereview.chromium.org/787833002
2014-12-09 05:35:07 -08:00
scroggo
0c4aba6edb
Replace EncodeBitmap with an interface.
...
Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().
Provides an implementation that supports the old version of
SkPicture::serialize().
TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
BUG=skia:3190
Review URL: https://codereview.chromium.org/784643002
2014-12-09 05:23:12 -08:00
egdaniel
8d95ffa497
Revert of Make all blending up to GrOptDrawState be handled by the xp/xp factory. (patchset #7 id:140001 of https://codereview.chromium.org/759713002/ )
...
Reason for revert:
break many gm's
Original issue's description:
> Make all blending up to GrOptDrawState be handled by the xp/xp factory.
>
> In this cl the blending information is extracted for the xp and stored in the ODS
> which is then used as it currently is. In the follow up cl, an XP backend will be added
> and at that point all blending work will take place inside XP's.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/7c66342a399b529634bed0fabfaa562db2c0dbd4
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/766653008
2014-12-08 13:26:43 -08:00
egdaniel
4ccf0b9405
Fix GrUnPreMulColor.
...
Current version incorrectly unpacked the resulting sk unpremulled color into rgba.
BUG=skia:3208
Review URL: https://codereview.chromium.org/787713002
2014-12-08 12:35:16 -08:00
egdaniel
7c66342a39
Make all blending up to GrOptDrawState be handled by the xp/xp factory.
...
In this cl the blending information is extracted for the xp and stored in the ODS
which is then used as it currently is. In the follow up cl, an XP backend will be added
and at that point all blending work will take place inside XP's.
BUG=skia:
Review URL: https://codereview.chromium.org/759713002
2014-12-08 11:20:40 -08:00
fmalita
2be0fd8dcb
Constify CreatePictureShader's picture arg.
...
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/768113004
2014-12-08 09:04:05 -08:00
reed
08c357c914
remove device::clear -- no longer called
...
BUG=skia:
Review URL: https://codereview.chromium.org/778373003
2014-12-08 08:00:29 -08:00
reed
b9bb38cd18
make SkColorShader private, use public factory
...
BUG=skia:
Need https://codereview.chromium.org/785823002/ to land first
Review URL: https://codereview.chromium.org/788533002
2014-12-08 06:06:36 -08:00
reed
f4e0d9eb2d
clear() is now an alias for drawPaint, so remove its virtual
...
Needs these to land first:
https://codereview.chromium.org/733343005
https://codereview.chromium.org/777413004
BUG=skia:
Review URL: https://codereview.chromium.org/780393002
2014-12-05 20:49:03 -08:00
jvanverth
28f9c606e4
Add support for half float alpha textures.
...
This allows us to create distance field textures with better precision,
which may help text quality.
BUG=skia:3103
Review URL: https://codereview.chromium.org/762923003
2014-12-05 13:06:35 -08:00
egdaniel
915187b71d
Check XpFactory equality in DrawState
...
BUG=skia:
Review URL: https://codereview.chromium.org/767873006
2014-12-05 12:58:28 -08:00
egdaniel
8bf2bd335f
Move GrPorterDuffXferProcessor to include/gpu/effects.
...
BUG=skia:
Review URL: https://codereview.chromium.org/780263003
2014-12-05 12:14:27 -08:00
bsalomon
c92aadcf9a
clean up default precision handling
...
R=joshualitt@google.com
Review URL: https://codereview.chromium.org/766753006
2014-12-04 13:02:47 -08:00
joshualitt
eb2a676165
Remove backend factories
...
BUG=skia:
Review URL: https://codereview.chromium.org/778453002
2014-12-04 11:35:34 -08:00
joshualitt
87f48d997e
create and thread batch tracker object
...
I remove the factory on the next CL
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/c3a6eb23483e5d28073b509a5f637f41660de294
Review URL: https://codereview.chromium.org/772513002
2014-12-04 10:41:40 -08:00
reed
8eddfb50c0
Change clear() to respect the clip
...
This reverts commit af641a1c10
.
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/783493002
2014-12-04 07:50:14 -08:00
joshualitt
841a6b54c1
Revert of create and thread batch tracker object (patchset #9 id:160001 of https://codereview.chromium.org/772513002/ )
...
Reason for revert:
Breaking linux layout test
Original issue's description:
> create and thread batch tracker object
>
> I remove the factory on the next CL
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c3a6eb23483e5d28073b509a5f637f41660de294
TBR=bsalomon@google.com ,joshualitt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/774133003
2014-12-04 06:00:41 -08:00
reed
b8eb85cd2f
make clear private (before we delete it)
...
BUG=skia:
Review URL: https://codereview.chromium.org/781593002
2014-12-04 03:48:34 -08:00
joshualitt
c3a6eb2348
create and thread batch tracker object
...
I remove the factory on the next CL
BUG=skia:
Review URL: https://codereview.chromium.org/772513002
2014-12-03 15:34:20 -08:00
reed
e5750729e4
Revert of Revert of remove unused device::eraseColor (patchset #1 id:1 of https://codereview.chromium.org/777003002/ )
...
Reason for revert:
fix landed in chrome to allow this (I hope)
Original issue's description:
> Revert of remove unused device::eraseColor (patchset #1 id:1 of https://codereview.chromium.org/765643004/ )
>
> Reason for revert:
> ../../skia/ext/bitmap_platform_device_cairo.cc:131:13: error: no member named 'eraseColor' in 'skia::BitmapPlatformDevice'
>
>
> Original issue's description:
> > remove unused device::eraseColor
> >
> > BUG=skia:
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/b1ab276c3719d6690e58f347c25126d2b8929c5d
>
> TBR=reed@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8b0197ef2e32be9d62e79d58f8b50811975c79c6
TBR=halcanary@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/779543004
2014-12-03 13:17:29 -08:00
tfarina
9ed02e40d1
Add SK_SUPPORT_LEGACY_PORTER_DUFF macro.
...
This trick will be used to remove deprecated SkPorterDuff API. But first
we need to add it so Android can be updated later.
BUG=skia:3178
R=scroggo@google.com
Review URL: https://codereview.chromium.org/758133004
2014-12-03 13:13:02 -08:00
egdaniel
c016fb8f9f
Use static XPF for porter duff xp factories.
...
BUG=skia:
Review URL: https://codereview.chromium.org/776843004
2014-12-03 11:41:55 -08:00
bsalomon
ee64d6ef49
Add glGetShaderPrecisionFormat
...
Review URL: https://codereview.chromium.org/778703003
2014-12-03 10:46:08 -08:00
halcanary
8b0197ef2e
Revert of remove unused device::eraseColor (patchset #1 id:1 of https://codereview.chromium.org/765643004/ )
...
Reason for revert:
../../skia/ext/bitmap_platform_device_cairo.cc:131:13: error: no member named 'eraseColor' in 'skia::BitmapPlatformDevice'
Original issue's description:
> remove unused device::eraseColor
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/b1ab276c3719d6690e58f347c25126d2b8929c5d
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/777003002
2014-12-03 10:41:11 -08:00
egdaniel
378092f3d1
Add XferProcessor factory in GrPaint and GrDrawState.
...
In this CL the XP should have zero effect on the actual rendering pipeline.
BUG=skia:
Review URL: https://codereview.chromium.org/751283002
2014-12-03 10:40:13 -08:00
reed
b1ab276c37
remove unused device::eraseColor
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/765643004
2014-12-03 09:47:48 -08:00
joshualitt
2dd1ae016d
First step to moving vertex attributes to the geometryProcessor
...
BUG=skia:
Review URL: https://codereview.chromium.org/761563002
2014-12-03 06:24:10 -08:00
reed
af641a1c10
Revert "Change clear() to respect the clip"
...
This reverts commit 3729469d6a
.
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/778563002
2014-12-02 19:40:18 -08:00
abarth
9503ac7a3c
Add matrix operations to C canvas API
...
R=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/769123002
2014-12-02 15:47:34 -08:00
mtklein
701dd4fbd7
Flail a little against LLVM crash.
...
Cannot reproduce this in my local Chromium checkout (using their Clang, just like the bots).
BUG=skia:
TBR=reed@google.com
Review URL: https://codereview.chromium.org/764433003
2014-12-02 13:17:06 -08:00
scroggo
ca0e67261e
Remove SK_SUPPORT_DEPRECATED_SCALARROUND.
...
Our clients no longer require it.
Review URL: https://codereview.chromium.org/772933002
2014-12-02 12:30:38 -08:00
Justin Novosad
5234075b1c
Adding a PictureResolution option to SkPictureImageFilter
...
This change adds an option to SkPictureImageFilter to make it
rasterize SkPicture in a resolution that matches the local coordinate
space (equivalent to the record-time device space).
BUG=skia:3176
R=reed@google.com , senorblanco@chromium.org
Review URL: https://codereview.chromium.org/753073010
2014-12-02 14:50:56 -05:00
reed
3729469d6a
Change clear() to respect the clip
...
patch from issue 769703002 at patchset 1 (http://crrev.com/769703002#ps1 )
BUG=skia:
Review URL: https://codereview.chromium.org/772533004
2014-12-02 10:08:11 -08:00
mtklein
cc969c4dd9
Make SkColorTable explicitly thread-safe.
...
Mostly this means using SkLazyPtr for the 16-bit cache.
We can remove the copy constructor now and just ref it instead.
BUG=skia:
Review URL: https://codereview.chromium.org/769323002
2014-12-02 10:02:47 -08:00
mtklein
775b8199a2
SkColorTable locking serves no purpose anymore.
...
The only thing the unlock methods were doing was assert their balance.
This removes the unlock methods and renames the lock methods "read".
BUG=skia:
Review URL: https://codereview.chromium.org/719213008
2014-12-02 09:11:25 -08:00
abarth
2fc6ea62ce
Add scale and skew to C canvas API
...
R=reed@chromium.org
BUG=skia:
Review URL: https://codereview.chromium.org/762493005
2014-12-01 14:04:03 -08:00
mtklein
05d611574a
SkDrawLooper: No need for virtual bounds computation methods.
...
No subclass overrides either method.
This is just warmup. Perf is neutral. The real meat of the time spent
is inside canComputeFastBounds / computeFastBounds, not getting to them.
BUG=skia:
Review URL: https://codereview.chromium.org/772573003
2014-12-01 13:03:22 -08:00
egdaniel
4bd4e8031d
Add function to return an unpremuled version of a GrColor
...
BUG=skia:
Review URL: https://codereview.chromium.org/773553002
2014-12-01 12:30:51 -08:00
mtklein
3f3b3d0035
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
2014-12-01 11:47:08 -08:00
scroggo
ca92fbd029
Remove orphaned SkImageDecoder::Target.
...
This was used by an experimental method on SkImageDecoder, which no
longer exists.
Review URL: https://codereview.chromium.org/760923003
2014-12-01 11:35:19 -08:00
mtklein
af57903f33
Force SkMatrix type while recording too.
...
This switches to a new way of doing this, enforcing the caching with the type
recorded rather than having to do it in SkRecorder. Should be more foolproof.
Updated SkPath and SkBitmap's equivalents too. ImmutableBitmap was close,
but using inheritance now makes the rest of the code less weird.
BUG=437511
I'm not sure whether or not this will _fix_ the SkMatrix aspect of that bug.
There may be other SkMatrices that we're racing on. It does cover the obvious
ones, though, and removing the SkTRacy<> wrapper will allow TSAN to show
us any other races.
It turned out to be easier to turn missing optional matrices into I early rather
than late. I figure this should be harmless. Recording and playback perf both
look neutral.
Review URL: https://codereview.chromium.org/773433003
2014-12-01 11:03:37 -08:00
mtklein
6e78293ee8
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
2014-12-01 10:56:05 -08:00
mtklein
52c293547b
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
2014-12-01 10:23:11 -08:00
cdalton
20b373cf31
Add color emoji fallback for nvpr text
...
BUG=skia:
Review URL: https://codereview.chromium.org/759613005
2014-12-01 08:38:55 -08:00
mtklein
5c9c9be1f5
Force path bounds in recording.
...
The use of SKTRacy isn't safe in SkPathRef.
There are logical dependencies between the racy fields.
Doesn't seem to affect recording performance:
$ c --match skp --config nonrendering
tabl_techmeme.skp 81.1us -> 86us 1.06x
desk_mapsvg.skp 1.23ms -> 1.26ms 1.02x
desk_yahooanswers.skp 114us -> 117us 1.02x
tabl_sahadan.skp 70.9us -> 72us 1.02x
desk_fontwipe.skp 31.6us -> 32us 1.01x
tabl_cuteoverload.skp 414us -> 419us 1.01x
desk_mobilenews.skp 503us -> 508us 1.01x
desk_tigersvg.skp 150us -> 152us 1.01x
desk_samoasvg.skp 608us -> 610us 1x
tabl_digg.skp 636us -> 638us 1x
tabl_pravda.skp 155us -> 156us 1x
desk_jsfiddlehumperclip.skp 33.9us -> 33.9us 1x
tabl_culturalsolutions.skp 295us -> 295us 1x
desk_youtube.skp 447us -> 448us 1x
desk_gws.skp 144us -> 144us 1x
tabl_frantzen.skp 42us -> 42us 1x
tabl_gspro.skp 50.1us -> 50us 1x
tabl_googlecalendar.skp 165us -> 165us 1x
desk_twitter.skp 359us -> 358us 1x
desk_wordpress.skp 588us -> 583us 0.99x
desk_jsfiddlebigcar.skp 32.8us -> 32.5us 0.99x
desk_booking.skp 838us -> 827us 0.99x
tabl_androidpolice.skp 1.42ms -> 1.4ms 0.99x
desk_blogger.skp 378us -> 372us 0.98x
desk_wowwiki.skp 1.11ms -> 1.09ms 0.98x
tabl_cnet.skp 115us -> 112us 0.97x
desk_silkfinance.skp 57.7us -> 55.9us 0.97x
tabl_cnn.skp 136us -> 131us 0.97x
desk_sfgate.skp 396us -> 377us 0.95x
tabl_deviantart.skp 107us -> 102us 0.95x
tabl_mozilla.skp 1.4ms -> 1.32ms 0.94x
BUG=437511
Review URL: https://codereview.chromium.org/762313002
2014-12-01 06:59:55 -08:00
mtklein
88fd0fbccc
Bump min picture version.
...
Chrome Stable is M39, which produces picture format v35:
https://chromium.googlesource.com/skia/+/chrome/m39/include/core/SkPicture.h
We don't need any code to deal with pictures older than v35.
(When M40 goes stable, we can step up to v37, the current latest version.)
BUG=skia:
Review URL: https://codereview.chromium.org/770703002
2014-12-01 06:56:38 -08:00
jvanverth
5eefe42e72
Fix assert in GrMaskFormatBytesPerPixel.
...
BUG=skia:3174
Review URL: https://codereview.chromium.org/762553006
2014-11-26 12:07:33 -08:00
joshualitt
267ce482b5
remove proc key
...
BUG=skia:
Review URL: https://codereview.chromium.org/755363002
2014-11-25 14:52:21 -08:00