reed
7eb33da7ee
Revert of SkOncePtr -> SkOnce (patchset #4 id:60001 of https://codereview.chromium.org/1953533002/ )
...
Reason for revert:
broken the Mac and Linux builders, e.g.:
https://build.chromium.org/p/chromium/builders/Mac/builds/15151
https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052
Original issue's description:
> SkOncePtr -> SkOnce
>
> It's always nice to kill off a synchronization primitive.
> And while less terse, I think this new code reads more clearly.
>
> ... and, SkOncePtr's tests were the only thing now using sk_num_cores()
> outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02
TBR=herb@google.com ,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/1945293004
2016-05-04 17:14:44 -07:00
reed
086eea93b1
Revert of SK_DECLARE_STATIC_MUTEX -> static SkMutex (patchset #1 id:1 of https://codereview.chromium.org/1948193002/ )
...
Reason for revert:
broken the Mac and Linux builders, e.g.:
https://build.chromium.org/p/chromium/builders/Mac/builds/15151
https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052
Original issue's description:
> SK_DECLARE_STATIC_MUTEX -> static SkMutex
>
> There's no need to use a macro to declare static SkMutexes any more
> (and there's likewise no need to restrict them to global scope).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1948193002
>
> Committed: https://skia.googlesource.com/skia/+/5e56cfd3fa1041dbb83899844fb92fa9a2ef1009
TBR=mtklein@google.com ,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/1945353003
2016-05-04 17:12:46 -07:00
mtklein
5e56cfd3fa
SK_DECLARE_STATIC_MUTEX -> static SkMutex
...
There's no need to use a macro to declare static SkMutexes any more
(and there's likewise no need to restrict them to global scope).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1948193002
Review-Url: https://codereview.chromium.org/1948193002
2016-05-04 15:21:12 -07:00
mtklein
9bd3fc7fa9
SkOncePtr -> SkOnce
...
It's always nice to kill off a synchronization primitive.
And while less terse, I think this new code reads more clearly.
... and, SkOncePtr's tests were the only thing now using sk_num_cores()
outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review-Url: https://codereview.chromium.org/1953533002
2016-05-04 14:40:18 -07:00
mtklein
b37c68ad42
Simplify implementation of SkOnce to not need so many comments.
...
I think this version reads more clearly, and the key invariants are
expressed in code rather than comments:
- race losers always go through an acquire
- we never exit the function unless fState is Done
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1951013004
Review-Url: https://codereview.chromium.org/1951013004
2016-05-04 13:57:30 -07:00
benjaminwagner
9b92ebdf41
Remove executable bit from source code files.
...
TBR=reed
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952773002
Review-Url: https://codereview.chromium.org/1952773002
2016-05-04 13:45:06 -07:00
reed
0ccc62d4f7
move colorshader into its own .cpp, add color4f variant
...
Implemented as a different subclass for SkColorShader (which is also private) partly to make the CL clearer/simpler, and partly for flatten/unflatten compatibility. Later I'm sure we could combine these if that proves useful.
Lots of TODOs at the moment, but still valuable to get reviewed.
Note: this ignores the question (for the moment) about how to interpret SkColor in the larger world. That needs to happen, but this CL is more focused on what *else* to do besides handle the old-style input (and old-style pipeline).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1934313002
Review-Url: https://codereview.chromium.org/1934313002
2016-05-04 13:09:39 -07:00
robertphillips
76948d4faa
Add Gr*Proxy classes
...
This isn't wired in anywhere yet.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002
Committed: https://skia.googlesource.com/skia/+/de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1
Committed: https://skia.googlesource.com/skia/+/92605b35efa0155c44d24bd8415b4cc1db8831db
Review-Url: https://codereview.chromium.org/1937553002
2016-05-04 12:47:41 -07:00
mtklein
427c2819d9
Modernize SkMutex and SkSemaphore.
...
- use <atomic>
- fuse SkMutex and SkBaseMutex
- fuse SkSemaphore and SkBaseSemaphore
Still TODO:
- replace SK_DECLARE_STATIC_MUTEX(name) with static SkMutex name
I just didn't want to bother fixing all that up until I know this CL sticks.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1947153002
No public API changes.
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/1947153002
2016-05-04 11:31:29 -07:00
brianosman
fad98562d8
Prototype code that turns any/every flattenable into JSON
...
This makes inspecting things in SkDebugger far more useful - any filter
or other complex object on the paint is ultimately visible. You still
have to do some guess work to figure out what the fields actually mean,
but you can at least cross-reference with the code in flatten().
Screenshots:
Before: https://screenshot.googleplex.com/a6JM5HBBe6G.png
After : https://screenshot.googleplex.com/XQfr4YJ6mnH.png
Changes to public API are just removals and changes to make
some functions virtual.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1920423002
Review-Url: https://codereview.chromium.org/1920423002
2016-05-04 11:06:28 -07:00
robertphillips
4f16e6361d
Revert of Add Gr*Proxy classes (patchset #10 id:220001 of https://codereview.chromium.org/1937553002/ )
...
Reason for revert:
ASAN
Original issue's description:
> Add Gr*Proxy classes
>
> This isn't wired in anywhere yet.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002
>
> Committed: https://skia.googlesource.com/skia/+/de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1
>
> Committed: https://skia.googlesource.com/skia/+/92605b35efa0155c44d24bd8415b4cc1db8831db
TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/1944953002
2016-05-03 12:56:04 -07:00
reed
50d3b57c8a
return 4x4 matrix from SkColorSpace
...
move SkMatrix44 into core (with alias in utils to transition chrome)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1943833002
Review-Url: https://codereview.chromium.org/1943833002
2016-05-03 12:13:21 -07:00
bungeman
68f7460fd1
Add SK_API to SkFontLCDConfig.
...
This will allow transition from double deprecated SkFontHost.
TBR=reed
This is obviously needed to remove other code.
Review-Url: https://codereview.chromium.org/1951463002
2016-05-03 11:56:03 -07:00
jvanverth
2af0f1b014
Apply setImageLayout() to all of a VkImage's subresources.
...
This also adds fLevelCount to GrVkImage::Resource, which allows
clients to wrap mipmapped textures.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1943933002
TBR=bsalomon@google.com
Review-Url: https://codereview.chromium.org/1943933002
2016-05-03 10:36:49 -07:00
robertphillips
92605b35ef
Add Gr*Proxy classes
...
This isn't wired in anywhere yet.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002
Committed: https://skia.googlesource.com/skia/+/de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1
Review-Url: https://codereview.chromium.org/1937553002
2016-05-03 08:47:01 -07:00
robertphillips
89d09a1f70
Revert of Add Gr*Proxy classes (patchset #9 id:160001 of https://codereview.chromium.org/1937553002/ )
...
Reason for revert:
Seems to be breaking N7 & ANGLE bots
Original issue's description:
> Add Gr*Proxy classes
>
> This isn't wired in anywhere yet.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002
>
> Committed: https://skia.googlesource.com/skia/+/de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1
TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/1949463002
2016-05-03 06:44:50 -07:00
brianosman
444f1ba1b7
Remove SkBitmapHeap and SkBitmapHeapReader. They're unused.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1938033002
Review-Url: https://codereview.chromium.org/1938033002
2016-05-03 06:07:38 -07:00
jvanverth
db1adf5989
Revert of Make stencils be attachable to render targets created via SkSurface::MakeFromBackendTextureAsRender… (patchset #9 id:150001 of https://codereview.chromium.org/1924183003/ )
...
Reason for revert:
Appears to be breaking the roll.
Original issue's description:
> Make stencils be attachable to render targets created via SkSurface::MakeFromBackendTextureAsRenderTarget
>
> This is a regression from "Refactor to separate backend object lifecycle
> and GpuResource budget decision".
>
> GrGLRenderTarget::CreateWrapped creates only render targets that wrap
> the FBO.
> GrGLRenderTargetTexture::CreateWrapped creates render targets that
> wrap the texture.
>
> Use the latter as the implementation for
> SkSurface::MakeFromBackendTextureAsRenderTarget.
>
>
> BUG=608238
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1924183003
>
> Committed: https://skia.googlesource.com/skia/+/fe635fd76bbc375d527d1884af23cc617ca364ee
>
> Committed: https://skia.googlesource.com/skia/+/1cb00e42bff455e23f6883bf09680438fa631224
TBR=bsalomon@google.com ,kkinnunen@nvidia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=608238
Review-Url: https://codereview.chromium.org/1943843002
2016-05-03 05:37:46 -07:00
robertphillips
de5bf0cfec
Add Gr*Proxy classes
...
This isn't wired in anywhere yet.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002
Review-Url: https://codereview.chromium.org/1937553002
2016-05-03 05:06:29 -07:00
kkinnunen
1cb00e42bf
Make stencils be attachable to render targets created via SkSurface::MakeFromBackendTextureAsRenderTarget
...
This is a regression from "Refactor to separate backend object lifecycle
and GpuResource budget decision".
GrGLRenderTarget::CreateWrapped creates only render targets that wrap
the FBO.
GrGLRenderTargetTexture::CreateWrapped creates render targets that
wrap the texture.
Use the latter as the implementation for
SkSurface::MakeFromBackendTextureAsRenderTarget.
BUG=608238
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1924183003
Committed: https://skia.googlesource.com/skia/+/fe635fd76bbc375d527d1884af23cc617ca364ee
Review-Url: https://codereview.chromium.org/1924183003
2016-05-02 23:16:42 -07:00
aam
cf975447a8
Make SkTime SK_API so that SkTime::GetDateTime() is visible to the clients.
...
# begin mtklein edits...
No public API changes.
TBR=reed@google.com
# end mtklein edits
BUG=skia:5230
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1930863003
Review-Url: https://codereview.chromium.org/1930863003
2016-05-02 15:04:46 -07:00
bungeman
0265707c19
Clean up SkFontConfigInterface implementation.
...
Renames some classes to avoid confusion with FontConfig.
Removed direct calls to FontConfig instead of calling FCI.
Moves the globals and factory to one (optional) file.
Moves font management code from typeface to font manager.
Adds index to fonts created from streams.
Associates FCI typefaces with the FCI instance which provides its identity.
Simplifies the singleton initialization.
Review-Url: https://codereview.chromium.org/1936213002
2016-05-02 11:54:13 -07:00
brianosman
18f13f3673
Remove (almost) unused read/writeFunctionPtr API.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937053002
Review-Url: https://codereview.chromium.org/1937053002
2016-05-02 07:51:08 -07:00
mtklein
59c12e3f00
remove non-static uses of SkOncePtr
...
Still slowly working through all the SK_DECLARE_STATIC_FOO macros.
SkOncePtr is complicating things by having SkOncePtr delete its pointer
and SkBaseOncePtr not. Simplify things by removing SkOncePtr, leaving
only the leaky SkBaseOncePtr.
We replace SkOncePtr<T> instead with SkOnce and T. In most cases this
did not need to be a pointer, and in some cases here we're even saving
a few bytes by replacing SkOncePtr<T> with SkOnce and a T.
The dependency map of SK_DECLARE_STATIC_FOO is:
SkBaseMutex -> SkBaseSemaphore -> SkBaseOncePtr
They're intertwined enough that I think I've got to do all three in one
next CL.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1939503002
Review-Url: https://codereview.chromium.org/1939503002
2016-05-02 07:19:41 -07:00
brianosman
57b4615974
Remove unused encodedString API on SkWriteBuffer/SkReadBuffer
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1936103002
Review-Url: https://codereview.chromium.org/1936103002
2016-05-02 07:09:25 -07:00
aleksandar.stojiljkovic
9516775857
Enable generating SkImage with the same uniqueID in SkImageGenerator subclass
...
Enable reusing uniqueID when instantiating SkImageGenerator subclasses enables
using uniqueID in client code to cache generated bitmaps with no need to keep
the reference to SkImageGenerator.
This is a bug fix for out of memory cause in chromium and 100% CPU usage
described in issue 165750#13:
- cache uses SkImage::uniqueID() to cache decoded bitmaps.
- every animation loop creates new SkImage instances.
- after decoding, bitmap copies are added to cache, filling it up with
duplicates of previous loops frames.
BUG=165750
Blink patch that depends on this:
https://codereview.chromium.org/1925533003/
"High CPU and increased memory usage fix for high-res (GIF, WEBP...) animations."
Review-Url: https://codereview.chromium.org/1928403002
2016-05-02 01:43:38 -07:00
mtklein
4d9ff62fa2
Remove SkWriter32::contiguousArray().
...
This method requires SkWriter32 have a contiguous array.
It does, and I plan to keep it that way (last time we checked
it's faster), but this turns that feature back into an
implementation detail.
This feature is only used by another unused feature, deep copies of
ops arrays in SkPictureData. Kill that, kill this.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1932223003
Depends on https://codereview.chromium.org/1936563002/
Only deleting API
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/1932223003
2016-04-29 14:45:36 -07:00
mtklein
e86e51fe7e
Add reminders that these classes have constexpr default constructors.
...
We can do this now that we can write "constexpr".
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1936653002
Review-Url: https://codereview.chromium.org/1936653002
2016-04-29 13:58:18 -07:00
mtklein
b4c899d48d
remove SkWriteBuffer::getWriter32().
...
SkWriteBuffer exposes its lower-level implementation SkWriter32 through
this one call. It's not currently used in any interesting way:
- write_encoded_bitmap() uses it to manually re-create writeDataAsByteArray();
- unit tests use it incidentally as a quick way to read the serialized bytes.
This should be SkWriteBuffer no longer necessarily needs to have an SkWriter32.
Landing this will let us then remove SkWriter32::contiguousArray().
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1936563002
TBR=reed@google.com
Just deleting API
Review-Url: https://codereview.chromium.org/1936563002
2016-04-29 13:58:09 -07:00
mtklein
1b5dd88454
remove SkWriteBuffer::reserve()
...
We're not using it for anything that we can't do using the clearer writeFoo()/readFoo() methods.
The deletions in SkPictureFlat.{h,cpp} and BitmapHeapTest.cpp clean up dead code.
This code has not been used for a long time. I happened to notice it because it
was another caller of reserve() (in a terrifyingly hacking/interesting way that
I bet we'll find I authored...)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1930103003
Deleting APIs unused publicly.
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/1930103003
2016-04-29 08:46:41 -07:00
bungeman
b4d46f03db
Remove skstd::is_function.
...
The VC++ STL with 2015u2 now provides a complete std::is_function.
Also, Skia is no longer using skstd::is_function.
Review-Url: https://codereview.chromium.org/1929343002
2016-04-29 08:27:14 -07:00
bsalomon
5668648e87
Unify implementations of stroking radius calculationsns
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1928133002
Review-Url: https://codereview.chromium.org/1928133002
2016-04-29 07:07:03 -07:00
djsollen
efe46d2094
Repurpose Release_Developer BUILDTYPE and remove SK_DEVELOPER.
...
The Release_Developer build type is now used to build Skia with
release level optimizations but still enable SK_DEBUG. This in turn
means that SkASSERTS and SkRTConf are available in this mode.
Further we can then remove SK_DEVELOPER as a define as it is true
iff SK_DEBUG is true.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1931903002
DOCS_PREVIEW= https://skia.org/?cl=1931903002
Review-Url: https://codereview.chromium.org/1931903002
2016-04-29 06:41:35 -07:00
robertphillips
175dd9b5e3
Clean up test drawContext usage
...
The general idea is to provide access to SkGpuDevice's drawContext rather than its GrRenderTarget. That is usually what the testing framework actually wants.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1930623003
Review-Url: https://codereview.chromium.org/1930623003
2016-04-28 14:32:04 -07:00
bungeman
801b44c453
Remove skstd::is_convertible.
...
We should now be able to use std::is_convertible.
TBR=reed@google.com
This doesn't change any API, just where we get a type trait from.
Review-Url: https://codereview.chromium.org/1931003002
2016-04-28 11:18:07 -07:00
robertphillips
d4c741e3d0
Refactor drawContext/RenderTarget creation
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1914883002
Committed: https://skia.googlesource.com/skia/+/2f1c42e8448bbbadeb3df1c626faa90aa33f8907
Review-Url: https://codereview.chromium.org/1914883002
2016-04-28 09:55:15 -07:00
reed
d77ac77924
remove (now unused) SkDivBits
...
needs https://codereview.chromium.org/1927823002/ to land first
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1925913002
Review-Url: https://codereview.chromium.org/1925913002
2016-04-28 09:31:31 -07:00
reed
28d5bdd97e
Revert of Repurpose Release_Developer BUILDTYPE and remove SK_DEVELOPER. (patchset #2 id:20001 of https://codereview.chromium.org/1927583002/ )
...
Reason for revert:
still blocking DEPS roll
Original issue's description:
> Repurpose Release_Developer BUILDTYPE and remove SK_DEVELOPER.
>
> The Release_Developer build type is now used to build Skia with
> release level optimizations but still enable SK_DEBUG. This in turn
> means that SkASSERTS and SkRTConf are available in this mode.
>
> Further we can then remove SK_DEVELOPER as a define as it is true
> iff SK_DEBUG is true.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1927583002
> DOCS_PREVIEW= https://skia.org/?cl=1927583002
>
> Committed: https://skia.googlesource.com/skia/+/48d6f88479e72efaf9b9d8f9c0769acb1ba773db
TBR=bungeman@gmail.com ,bungeman@google.com,benjaminwagner@google.com,djsollen@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/1918253006
2016-04-28 08:12:55 -07:00
robertphillips
aa19a5fbc5
Revert of Refactor drawContext/RenderTarget creation (patchset #8 id:140001 of https://codereview.chromium.org/1914883002/ )
...
Reason for revert:
Experimental revert to see if this is blocking the DEPS roll.
Original issue's description:
> Refactor drawContext/RenderTarget creation
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1914883002
>
> Committed: https://skia.googlesource.com/skia/+/2f1c42e8448bbbadeb3df1c626faa90aa33f8907
TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/1929833004
2016-04-28 06:21:55 -07:00
reed
1541130b66
remove SK_SUPPORT_LEGACY_DIVBITS_UB -- chrome no longer defines this
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1927823002
TBR=mtklein@google.com
Review-Url: https://codereview.chromium.org/1927823002
2016-04-27 18:45:36 -07:00
djsollen
48d6f88479
Repurpose Release_Developer BUILDTYPE and remove SK_DEVELOPER.
...
The Release_Developer build type is now used to build Skia with
release level optimizations but still enable SK_DEBUG. This in turn
means that SkASSERTS and SkRTConf are available in this mode.
Further we can then remove SK_DEVELOPER as a define as it is true
iff SK_DEBUG is true.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1927583002
DOCS_PREVIEW= https://skia.org/?cl=1927583002
Review-Url: https://codereview.chromium.org/1927583002
2016-04-27 13:37:23 -07:00
robertphillips
2f1c42e844
Refactor drawContext/RenderTarget creation
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1914883002
Review-Url: https://codereview.chromium.org/1914883002
2016-04-27 13:34:01 -07:00
halcanary
eabaf79824
SkDocument::CreateXPS fix roll
...
NOTRY=true
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/1918713006
2016-04-27 12:07:55 -07:00
senorblanco
900c367796
Image filters: de-nest SkImageFilter::Cache and Cache::Key.
...
This reduces the public header, and also allows us to foward-
declare them, so we can remove an #include from all the
SkDevice subclass headers.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1919063002
Review-Url: https://codereview.chromium.org/1919063002
2016-04-27 11:31:23 -07:00
robertphillips
6c7e325236
Bring sk_sp to GrDrawContext
...
This is split out of: https://codereview.chromium.org/1914883002/ (Refactor drawContext/RenderTarget creation)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1918003003
Review-Url: https://codereview.chromium.org/1918003003
2016-04-27 10:47:51 -07:00
bungeman
b4bb7d8255
Add oblique as a slant.
...
Some fonts have italic and oblique in the same family, see
http://lucidafonts.com/fonts/family/lucida-sans
http://www.gust.org.pl/projects/e-foundry/latin-modern
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1921903002
Chromium side change at https://crrev.com/1921503006/ .
Review-Url: https://codereview.chromium.org/1921903002
2016-04-27 10:21:05 -07:00
reed
1e7f5e708e
remove 'deprecated' region from SkDraw
...
Most call-sites that used it just took its bounds, so it was trivial to convert them
to get the bounds of the RasterClip. Two clients wanted the actual region:
1. layeriter for android
2. pdf
Android already only has BW clips, so should be safe.
PDF now overrides its clip methods to ensure that all clips are BW.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1925693002
Review URL: https://codereview.chromium.org/1925693002
2016-04-27 07:49:17 -07:00
halcanary
4b6566644f
SkDocument/PDF: new API
...
has a pdf/a switch.
sets metadata in factory.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1916093002
Review URL: https://codereview.chromium.org/1916093002
2016-04-27 07:45:18 -07:00
reed
86ae3d1614
make context() virtual on device
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1922123002
TBR=robertphilips
Review URL: https://codereview.chromium.org/1922123002
2016-04-26 06:57:31 -07:00
msarett
68758aed88
Remove SkEncodedInfo kPreSwizzled_Color from public API
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1918943002
Review URL: https://codereview.chromium.org/1918943002
2016-04-25 11:41:15 -07:00
halcanary
484b3d0b83
SkDefaultColorProfile: Hide gDefaultProfileIsSRGB
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1917443002
Review URL: https://codereview.chromium.org/1917443002
2016-04-25 10:32:23 -07:00
msarett
ac6c75056f
Remove SkEncodedInfo kUnknown_Color and kUnknown_Alpha from public API
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1918873002
Review URL: https://codereview.chromium.org/1918873002
2016-04-25 09:30:24 -07:00
reed
96a04f3299
simplify handle-affine: subclass overrides just describe their leaf behavior
...
added new test case (that would have failed before) of blur with a colorfilter input
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1915943002
Review URL: https://codereview.chromium.org/1915943002
2016-04-25 09:25:15 -07:00
msarett
edf7fcd8b9
Make SkDrawable an SkFlattenable
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1911403004
Review URL: https://codereview.chromium.org/1911403004
2016-04-25 06:40:26 -07:00
reed
bb34a8ac59
allow imagefilter to manage CTM decomposition
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1908173006
Review URL: https://codereview.chromium.org/1908173006
2016-04-23 15:19:07 -07:00
robertphillips
36736a2dae
Remove SkCanvas::LayerIter guard
...
The LayerIter is no longer required by the Bazel build.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1917693002
Review URL: https://codereview.chromium.org/1917693002
2016-04-23 08:26:44 -07:00
msarett
a45a668fa5
Use SkEncodedInfo in place of SkSwizzler::SrcConfig
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1911613002
Review URL: https://codereview.chromium.org/1911613002
2016-04-22 13:18:37 -07:00
msarett
a3b3b238f5
Enable flattening/unflattening with custom unflatten procs
...
Now flattenables are serialized using a string name, so that
flattenables do not necessarily need to be registered before
serialization. They just need to override getTypeName().
Allows custom unflatten procs to be set on the SkReadBuffer.
This is optional if the flattenable is registered, but otherwise
must be called.
This was split off from:
https://codereview.chromium.org/1837913003/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1858323002
Review URL: https://codereview.chromium.org/1858323002
2016-04-22 12:43:07 -07:00
robertphillips
99e20891a0
Optionally enable SkValidatingReadBuffer in SkPictureImageFilter
...
The task here is to get the type of ReadBuffer being used in SkPicture::MakeFromBuffer mirrored in the down-stack SkPicturePlayback::draw call.
BUG=skia:5208
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1918433002
Review URL: https://codereview.chromium.org/1918433002
2016-04-22 11:40:42 -07:00
robertphillips
7715e06b68
Retract SkDevice a bit more
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1905383002
Review URL: https://codereview.chromium.org/1905383002
2016-04-22 10:57:16 -07:00
senorblanco
f5575463f4
Remove some unnecessary #includes of SkImageFilter.h
...
R=robertphillips@google.com
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1907283002
Review URL: https://codereview.chromium.org/1907283002
2016-04-22 07:36:12 -07:00
scroggo
6351640285
Fixes for SkRWBuffer
...
Do not call SkBufferHead::validate in SkROBuffer's destructor, which
may be called in a separate thread from SkRWBuffer::append. validate()
reads SkBufferBlock::fUsed, and append() writes to it, resulting in
a data race.
Update some comments to be more clear about how it is safe to use
these classes across threads.
Test the readers in separate threads.
In addition, make sure it is safe to create a reader even when no
data has been appended. Add tests for this case.
Mark a parameter to SkBufferHead::validate() as const, reflecting
its use.
BUG=chromium:601578
BUG=chromium:605479
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1871953002
Review URL: https://codereview.chromium.org/1871953002
2016-04-22 06:59:01 -07:00
kkinnunen
2e6055b3ea
Refactor to separate backend object lifecycle and GpuResource budget decision
...
Refactor GrGpuResource to contain two different pieces of state:
a) instance is budgeted or not budgeted
b) instance references wrapped backend objects or not
The "object lifecycle" was also attached to backend object
handles (ids), which made the code a bit unclear. Backend objects
would be associated with GrGpuResource::LifeCycle, even though
GrGpuResource::LifeCycle refers to the GpuResource, and individual
backend objects in one GpuResource might be governed with different
"lifecycle".
Mark the budgeted/not budgeted with SkBudgeted::kYes, SkBudgeted::kNo.
This was previously GrGpuResource::kCached_LifeCycle,
GrGpuResource::kUncached_LifeCycle.
Mark the "references wrapped object" with boolean. This was previously
GrGpuResource::kBorrowed_LifeCycle,
GrGpuResource::kAdopted_LifeCycle for GrGpuResource.
Associate the backend object ownership status with
GrBackendObjectOwnership for the backend object handles.
The resource type leaf constuctors, such has GrGLTexture or
GrGLTextureRenderTarget take "budgeted" parameter. This parameter
is passed to GrGpuResource::registerWithCache().
The resource type intermediary constructors, such as GrGLTexture
constructors for class GrGLTextureRenderTarget do not take "budgeted"
parameters, intermediary construtors do not call registerWithCache.
Removes the need for tagging GrGpuResource -derived subclass
constructors with "Derived" parameter.
Makes instances that wrap backend objects be registered with
a new function GrGpuResource::registerWithCacheWrapped().
Removes "budgeted" parameter from classes such as StencilAttahment, as
they are always cached and never wrap any external backend objects.
Removes the use of concept "external" from the member function names.
The API refers to the objects as "wrapped", so make all related
functions use the term consistently.
No change in functionality. Resources referencing wrapped objects are
always inserted to the cache with budget decision kNo.
BUG=594928
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1862043002
Review URL: https://codereview.chromium.org/1862043002
2016-04-22 01:48:29 -07:00
robertphillips
cb61a6452f
Add compile guard for SkCanvas::LayerIter
...
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1911893002
Review URL: https://codereview.chromium.org/1911893002
2016-04-21 15:22:14 -07:00
jvanverth
b0d4352ca6
Revise WSI setup.
...
- Set up present queue creation correctly.
- Move WSI functions to VulkanTestContext.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1899213002
Review URL: https://codereview.chromium.org/1899213002
2016-04-21 11:46:23 -07:00
robertphillips
da2cd8b1d9
Hide SkCanvas::LayerIter
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1897863008
Committed: https://skia.googlesource.com/skia/+/a814000cbb0e90624a410b4359fff7f3ec66f0e0
Review URL: https://codereview.chromium.org/1897863008
2016-04-21 11:05:33 -07:00
halcanary
177f2f69a1
SkPathEffect.h: add SK_API where needed
...
motivation: .so fiddle
TBR=reed@google.com
no api chages, only visibility
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1908893004
Review URL: https://codereview.chromium.org/1908893004
2016-04-21 10:54:11 -07:00
bungeman
6a6f3c58b4
Fix indentation and casts in SkTArray.
...
Review URL: https://codereview.chromium.org/1902423007
2016-04-21 10:52:03 -07:00
krasin
e0c1d285a0
SkTArray: fix invalid reinterpret_casts over non-initialized memory.
...
This should fix 'CFI Linux' buildbot, which is currently horribly broken:
https://build.chromium.org/p/chromium.fyi/builders/CFI%20Linux/builds/5115
BUG=605337
Review URL: https://codereview.chromium.org/1908763002
2016-04-21 08:34:00 -07:00
egdaniel
58a8d9214a
Update min Vulkan version to 1.0.8.0, and fix various bugs
...
With updating the SDK, the debug layers also showed multiple bugs.
I have fixed those as well in this CL. These include:
1. Incorrectly tracking the allocated descriptor sets from the descriptor pools
2. Using MemoryBarriers inside render passes.
3. Correctly setting the Stencil Image layout anytime we are using a render pass with a stencil attachment
4. Setting the correct aspect mask for Depth/Stencil in a barrier.
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1906623002
Review URL: https://codereview.chromium.org/1906623002
2016-04-21 08:03:10 -07:00
senorblanco
32eaa8993d
Image filters: remove SkBitmap-based cache.
...
Also some #include cleanup.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1905753002
Review URL: https://codereview.chromium.org/1905753002
2016-04-21 06:49:15 -07:00
fmalita
a1f4fa7230
Revert of Hide SkCanvas::LayerIter (patchset #2 id:20001 of https://codereview.chromium.org/1897863008/ )
...
Reason for revert:
Das roll ist gebusted: https://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/214775/steps/compile%20%28with%20patch%29/logs/stdio
FAILED: /b/build/slave/cache/cipd/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/WebKit/Source/platform/graphics/paint/blink_platform_unittests.PaintArtifactToSkCanvasTest.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=266460-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DINSIDE_BLINK -DMOJO_USE_SYSTEM_IMPL -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DUNIT_TEST -DGTEST_HAS_RTTI=0 -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DENABLE_OILPAN=1 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DENABLE_INPUT_MULTIPLE_FIELDS_UI=1 -DWTF_USE_ICCJPEG=1 -DWTF_USE_QCMSLIB=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DSK_SUPPORT_GPU=1 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DUSE_LIBPCI=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -Igen/blink -I../.. -I../../skia/config -I../../third_party/WebKit/Source -I../../third_party/khronos -I../../gpu -Igen/angle -I../../third_party/WebKit -Igen/third_party/WebKit -I../../testing/gmock/include -I../../testing/gtest/include -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/utils/mac -I../../skia/ext -I../../third_party/harfbuzz-ng/src -I../../third_party/qcms/src -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/libwebp -I../../third_party/ots/include -I../../v8/include -I../../third_party/iccjpeg -I../../third_party/libjpeg_turbo -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O2 -fvisibility=hidden -Werror -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/mac/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -Xclang -plugin-arg-find-bad-constructs -Xclang check-implicit-copy-ctors -fcolor-diagnostics -fno-strict-aliasing -Xclang -load -Xclang /b/build/slave/mac/build/src/third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib -Xclang -add-plugin -Xclang blink-gc-plugin -Xclang -plugin-arg-blink-gc-plugin -Xclang enable-oilpan -Xclang -plugin-arg-blink-gc-plugin -Xclang warn-raw-ptr -c ../../third_party/WebKit/Source/platform/graphics/paint/PaintArtifactToSkCanvasTest.cpp -o obj/third_party/WebKit/Source/platform/graphics/paint/blink_platform_unittests.PaintArtifactToSkCanvasTest.o
../../third_party/WebKit/Source/platform/graphics/paint/PaintArtifactToSkCanvasTest.cpp:201:22: error: 'LayerIter' is a protected member of 'SkCanvas'
return SkCanvas::LayerIter(canvas, false).clip();
^
../../third_party/skia/include/core/SkCanvas.h:1230:18: note: declared protected here
class SK_API LayerIter /*: SkNoncopyable*/ {
^
1 error generated.
ninja: build stopped: subcommand failed.
Original issue's description:
> Hide SkCanvas::LayerIter
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1897863008
>
> Committed: https://skia.googlesource.com/skia/+/a814000cbb0e90624a410b4359fff7f3ec66f0e0
TBR=reed@google.com ,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1906573003
2016-04-20 17:03:38 -07:00
reed
8c30a8196d
post apply non-scale transforms after imagefilters have run
...
may choose to eliminate the final matrix-filter buffer before the sprite blit, but at the moment want to defer that change to a 2nd CL.
heavily inspired by https://codereview.chromium.org/1140943004
Need these CLs to land first:
https://codereview.chromium.org/1898193005/#
https://codereview.chromium.org/1902253003/
BUG=skia:3288
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1899263002
Review URL: https://codereview.chromium.org/1899263002
2016-04-20 16:36:51 -07:00
robertphillips
a814000cbb
Hide SkCanvas::LayerIter
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1897863008
Review URL: https://codereview.chromium.org/1897863008
2016-04-20 15:57:27 -07:00
herb
9bc22351b5
Make all the codecs default profiles based on gTreatSkColorAsSRGB.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1893203006
Review URL: https://codereview.chromium.org/1893203006
2016-04-20 15:07:32 -07:00
mtklein
650f9e9a26
SkOnce: 2 bytes -> 1 byte
...
This uses the same logic we worked out for SkOncePtr to reduce
the memory footprint of SkOnce from a done byte and lock byte
to a single 3-state byte:
- NotStarted: no thread has tried to run fn() yet
- Active: a thread is running fn()
- Done: fn() is complete
Threads which see Done return immediately.
Threads which see NotStarted try to move to Active, run fn(), then move to Done.
Threads which see Active spin until the active thread moves to Done.
This additionally fixes a too-weak memory order bug in SkOncePtr,
and adds a big note to explain.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1904483003
Committed: https://skia.googlesource.com/skia/+/df02d338be8e3c1c50b48a3a9faa582703a39c07
Review URL: https://codereview.chromium.org/1904483003
2016-04-20 13:49:15 -07:00
mtklein
9134686fd9
Revert of SkOnce: 2 bytes -> 1 byte (patchset #4 id:60001 of https://codereview.chromium.org/1904483003/ )
...
Reason for revert:
bust the roll
Original issue's description:
> SkOnce: 2 bytes -> 1 byte
>
> This uses the same logic we worked out for SkOncePtr to reduce
> the memory footprint of SkOnce from a done byte and lock byte
> to a single 3-state byte:
>
> - NotStarted: no thread has tried to run fn() yet
> - Active: a thread is running fn()
> - Done: fn() is complete
>
> Threads which see Done return immediately.
> Threads which see NotStarted try to move to Active, run fn(), then move to Done.
> Threads which see Active spin until the active thread moves to Done.
>
> This additionally fixes a too-weak memory order bug in SkOncePtr,
> and adds a big note to explain.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1904483003
>
> Committed: https://skia.googlesource.com/skia/+/df02d338be8e3c1c50b48a3a9faa582703a39c07
TBR=herb@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1898413004
2016-04-20 13:02:09 -07:00
msarett
c30c418f4e
Add SkEncodedInfo to report properties of encoded image data
...
All this does is build an SkEncodedInfo for each codec, and
then convert it to an SkImageInfo.
In future steps I intend to:
(1) Use SkEncodedInfo in place of SrcConfig in SkSwizzler.
(2) Support more conversions in SkSwizzler (non-native
BGRA/RGBA, 16-bit components, float, fixed point)
(3) Investigate optimizing conversions from encoded data
to linear color spaces.
BUG=skia:4133
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820073002
Committed: https://skia.googlesource.com/skia/+/f682d9ad70d690a343bc15e26ef321d86770be41
Review URL: https://codereview.chromium.org/1820073002
2016-04-20 11:53:35 -07:00
robertphillips
3e302275b3
Begin removing deprecated (and now, unused) ImageFilter code paths
...
This CL focuses on removing the Proxy objects but takes some other stuff with it.
BUG=skia:4965
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1896383003
Review URL: https://codereview.chromium.org/1896383003
2016-04-20 11:48:36 -07:00
mtklein
df02d338be
SkOnce: 2 bytes -> 1 byte
...
This uses the same logic we worked out for SkOncePtr to reduce
the memory footprint of SkOnce from a done byte and lock byte
to a single 3-state byte:
- NotStarted: no thread has tried to run fn() yet
- Active: a thread is running fn()
- Done: fn() is complete
Threads which see Done return immediately.
Threads which see NotStarted try to move to Active, run fn(), then move to Done.
Threads which see Active spin until the active thread moves to Done.
This additionally fixes a too-weak memory order bug in SkOncePtr,
and adds a big note to explain.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1904483003
Review URL: https://codereview.chromium.org/1904483003
2016-04-20 10:54:54 -07:00
bungeman
0d9e9bee17
SkTArray movable and swap for move only elements.
...
SkTArray cannot currently contain move only elements because its swap
currently requires the SkTArray to be copyable. This makes SkTArray
movable and makes its swap move instead of copy.
Review URL: https://codereview.chromium.org/1904663004
2016-04-20 10:22:20 -07:00
egdaniel
09aa1fce69
Refactor how we store and use samplers in Ganesh
...
The main goal of this refactorization is to allow Vulkan to use separate
sampler and texture objects in the shader and descriptor sets and combine
them into a sampler2d in the shader where needed.
A large part of this is separating how we store samplers and uniforms in the
UniformHandler. We no longer need to store handles to samplers besides when
we are initially emitting code. After we emit code all we ever do is loop over
all samplers and do some processor independent work on them, so we have no need
for direct access to individual samplers.
In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
touch them again, so no need to save sampler info there. The texture access on
program reuse just assume that they come in the same order as we set the texture
units for the samplers
For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
then when we get new textures, we just assume they come in in the same order as we
set the samplers on the descriptor sets. Thus no need to save direct vulkan info.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885863004
Committed: https://skia.googlesource.com/skia/+/45b61a1c4c0be896e7b12fd1405abfece799114f
Review URL: https://codereview.chromium.org/1885863004
2016-04-20 07:09:46 -07:00
svaisanen
b988ecf639
Enable NV_path_rendering in the Null GL.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1882563002
Review URL: https://codereview.chromium.org/1882563002
2016-04-20 00:36:53 -07:00
robertphillips
718a5adc6d
Switch SkColorFilterImageFilter over to new onFilterImage interface (again)
...
Back when this was originally reverted I was able to easily repro the perf regression locally. At ToT Skia/Chrome I can no longer repro the perf regression with this CL (in fact there is a modest perf improvement).
I propose landing this and then watching the Chromium perf bots.
BUG=602300,598028
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1901513002
Review URL: https://codereview.chromium.org/1901513002
2016-04-19 10:21:03 -07:00
msarett
be991efbd9
Delete unused fNamedFactorySet from SkWriteBuffer
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1903483002
Review URL: https://codereview.chromium.org/1903483002
2016-04-19 07:27:58 -07:00
robertphillips
3c920243f8
Revert of Add SkEncodedInfo to report properties of encoded image data (patchset #6 id:200001 of https://codereview.chromium.org/1820073002/ )
...
Reason for revert:
Lots of bots failing
Original issue's description:
> Add SkEncodedInfo to report properties of encoded image data
>
> All this does is build an SkEncodedInfo for each codec, and
> then convert it to an SkImageInfo.
>
> In future steps I intend to:
> (1) Use SkEncodedInfo in place of SrcConfig in SkSwizzler.
> (2) Support more conversions in SkSwizzler (non-native
> BGRA/RGBA, 16-bit components, float, fixed point)
> (3) Investigate optimizing conversions from encoded data
> to linear color spaces.
>
> BUG=skia:4133
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820073002
>
> Committed: https://skia.googlesource.com/skia/+/f682d9ad70d690a343bc15e26ef321d86770be41
TBR=scroggo@google.com ,reed@google.com,msarett@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4133
Review URL: https://codereview.chromium.org/1895383002
2016-04-19 04:41:12 -07:00
msarett
f682d9ad70
Add SkEncodedInfo to report properties of encoded image data
...
All this does is build an SkEncodedInfo for each codec, and
then convert it to an SkImageInfo.
In future steps I intend to:
(1) Use SkEncodedInfo in place of SrcConfig in SkSwizzler.
(2) Support more conversions in SkSwizzler (non-native
BGRA/RGBA, 16-bit components, float, fixed point)
(3) Investigate optimizing conversions from encoded data
to linear color spaces.
BUG=skia:4133
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820073002
Review URL: https://codereview.chromium.org/1820073002
2016-04-18 16:20:00 -07:00
robertphillips
bde57ed11b
Make SkImageFilter::Cache purging methods pure virtual
...
This is intended to see if the Windows 10 bots ignoring of the purge methods is a compiler bug.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1901883002
Review URL: https://codereview.chromium.org/1901883002
2016-04-18 14:49:57 -07:00
senorblanco
f35566e8a2
Remove deprecated paths from image filter infrastructure.
...
Now that there are no filterImageGPUDeprecated() implementations,
we can being to rip out the deprecated infrastructure.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1888243003
Committed: https://skia.googlesource.com/skia/+/6fb3cd7209849e665635ac17ef4eef4ad63e7f61
Review URL: https://codereview.chromium.org/1888243003
2016-04-18 10:32:02 -07:00
ericrk
983294f78f
Skia Filter Quality and Scaling Metrics
...
Adds histogram metrics to log the filter quality and scale factor of
each image draw. To make the data easier to consume, this is broken
down into a number of individual histograms:
- Filter quality across all draw calls
- Scale amount across all draw calls
- Scale amount per filter quality (4 histograms total)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686203002
Committed: https://skia.googlesource.com/skia/+/f57b3a6e4a002caf01378832cbd756c6c163a783
Review URL: https://codereview.chromium.org/1686203002
2016-04-18 09:14:00 -07:00
mtklein
d9dd428211
Modernize and trim down SkOnce.
...
The API and implementation are very much simplified.
You may not want to bother reading the diff.
As is our trend, SkOnce now uses <atomic> directly.
Member initialization means we don't need SK_DECLARE_STATIC_ONCE.
SkSpinlock already works this same way.
All uses of the old API taking an external bool* and Lock* were pessimal,
so I have not carried this sort of API forward. It's simpler, faster,
and more space-efficient to always use this single SkOnce class interface.
SkOnce weighs 2 bytes: a done bool and an SkSpinlock, also a bool internally.
This API refactoring opens up the opportunity to fuse those into a single
three-state byte if we'd like.
No public API changes.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1894893002
Review URL: https://codereview.chromium.org/1894893002
2016-04-18 08:09:11 -07:00
robertphillips
f7142e71d7
Split AlphaThresholdEffect out into its own file
...
Mainly mechanical although I did:
convert Create method to sk_sp Make version
rm extra '\t's and '\n's in emitCode
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1893193002
Review URL: https://codereview.chromium.org/1893193002
2016-04-18 07:20:05 -07:00
robertphillips
cb232e8b1b
Revert of Remove deprecated paths from image filter infrastructure. (patchset #2 id:20001 of https://codereview.chromium.org/1888243003/ )
...
Reason for revert:
Surprisingly (appallingly?), Chrome calls canFilterImageGPU
Original issue's description:
> Remove deprecated paths from image filter infrastructure.
>
> Now that there are no filterImageGPUDeprecated() implementations,
> we can being to rip out the deprecated infrastructure.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1888243003
>
> Committed: https://skia.googlesource.com/skia/+/6fb3cd7209849e665635ac17ef4eef4ad63e7f61
TBR=reed@google.com ,senorblanco@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1893993002
2016-04-17 14:31:22 -07:00
robertphillips
225db4441e
Outline SkImageFilter Make methods
...
Mainly mechanical CL.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1893973002
Review URL: https://codereview.chromium.org/1893973002
2016-04-17 14:27:05 -07:00
senorblanco
6fb3cd7209
Remove deprecated paths from image filter infrastructure.
...
Now that there are no filterImageGPUDeprecated() implementations,
we can being to rip out the deprecated infrastructure.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1888243003
Review URL: https://codereview.chromium.org/1888243003
2016-04-17 14:02:04 -07:00
reed
9d453b09d5
Revert of move static arrays into impl, to avoid multiple copies (patchset #3 id:40001 of https://codereview.chromium.org/1889793007/ )
...
Reason for revert:
FAILED: if [ ! -e lib/libgfx.so -o ! -e lib/libgfx.so.TOC ]; then /b/build/slave/linux_chromeos/build/src/build/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/b/build/slave/linux_chromeos/build/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 -Wl,--icf=all -o lib/libgfx.so -Wl,-soname=libgfx.so @lib/libgfx.so.rsp && { readelf -d lib/libgfx.so | grep SONAME ; nm -gD -f p lib/libgfx.so | cut -f1-2 -d' '; } > lib/libgfx.so.TOC; else /b/build/slave/linux_chromeos/build/src/build/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/b/build/slave/linux_chromeos/build/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 -Wl,--icf=all -o lib/libgfx.so -Wl,-soname=libgfx.so @lib/libgfx.so.rsp && { readelf -d lib/libgfx.so | grep SONAME ; nm -gD -f p lib/libgfx.so | cut -f1-2 -d' '; } > lib/libgfx.so.tmp && if ! cmp -s lib/libgfx.so.tmp lib/libgfx.so.TOC; then mv lib/libgfx.so.tmp lib/libgfx.so.TOC ; fi; fi
obj/ui/gfx/gfx.blit.o:../../ui/gfx/blit.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
obj/ui/gfx/gfx.canvas.o:../../ui/gfx/canvas.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
obj/ui/gfx/gfx.canvas_skia.o:../../ui/gfx/canvas_skia.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
obj/ui/gfx/codec/gfx.jpeg_codec.o:../../ui/gfx/codec/jpeg_codec.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Original issue's description:
> move static arrays into impl, to avoid multiple copies
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1889793007
>
> Committed: https://skia.googlesource.com/skia/+/6d7cd1f421dbde43dd2db655ca477c05312ec5fd
TBR=fmalita@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:
Review URL: https://codereview.chromium.org/1899563002
2016-04-16 12:24:09 -07:00
robertphillips
f230c6d979
Switch SkXfermodeImagerFilter over to new onFilterImage interface
...
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1894643002
Review URL: https://codereview.chromium.org/1894643002
2016-04-15 12:47:42 -07:00
reed
2a04104ba0
exernalize imagefactory guard
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1897453002
TBR=
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review URL: https://codereview.chromium.org/1897453002
2016-04-15 10:56:52 -07:00
reed
6d7cd1f421
move static arrays into impl, to avoid multiple copies
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1889793007
Review URL: https://codereview.chromium.org/1889793007
2016-04-15 10:03:03 -07:00
robertphillips
6b13473dd4
Move SkImageFilter over to storing sk_sps
...
This CL also removes the old bare-pointer style ctor.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1894573002
Review URL: https://codereview.chromium.org/1894573002
2016-04-15 09:58:37 -07:00