Commit Graph

1780 Commits

Author SHA1 Message Date
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
brianosman
82996b8200 Get skiaserve working on Windows.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1903203003

Review URL: https://codereview.chromium.org/1903203003
2016-04-20 10:52:54 -07:00
jvanverth
c3d706f7ce Revert of Use transfer buffer for BatchAtlas texture copies (patchset #9 id:160001 of https://codereview.chromium.org/1888473002/ )
Reason for revert:
Lots of sync issues with paths and text.

Original issue's description:
> Use transfer buffer for BatchAtlas texture copies.
>
> Sets up use of transfer buffer (if available) to do one-copy transfers.
> Get transfer buffers working properly in GL.
> Implement GrVkGpu::onTransferPixels.
> Check caps to ensure we can create a transfer buffer.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1888473002
>
> Committed: https://skia.googlesource.com/skia/+/b0ec9836dbf7f2304a3a29289b818719ca0a39bd

TBR=robertphillips@google.com,egdaniel@google.com,bsalomon@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/1904723003
2016-04-20 10:33:28 -07:00
jvanverth
b0ec9836db Use transfer buffer for BatchAtlas texture copies.
Sets up use of transfer buffer (if available) to do one-copy transfers.
Get transfer buffers working properly in GL.
Implement GrVkGpu::onTransferPixels.
Check caps to ensure we can create a transfer buffer.

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

Review URL: https://codereview.chromium.org/1888473002
2016-04-20 05:54:02 -07:00
robertphillips
5e3815b4d0 Rein in the use of SkDevice.h
Nothing interesting.

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1904673003
2016-04-20 05:29:51 -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
brianosman
312aa6a81e Adding support for controlling the global sRGB SkColor switch.
Frontend change: https://codereview.chromium.org/1900233002/

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

Review URL: https://codereview.chromium.org/1902143002
2016-04-19 12:47:54 -07:00
mtklein
05db63b5fc Remove static initializer for SkOpts::Init()
Static initializers run in a confusing unspecified order,
so it's best to have as few of them as possible.

Most tools and clients I can find already call SkGraphics::Init(),
(or equivalently create an SkAutoGraphics) which calls SkOpts::Init():
   - Chrome
   - Chrome renderer
   - Android
   - DM
   - nanobench
   - SampleApp
   - VisualBench
   - the old debugger

Seems like the only thing relying on this static initializer today is
the new debugger, fixed here.

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1903503002
2016-04-19 12:42:24 -07:00
brianosman
7831295c63 Adding support for playback to L32/S32/F16 canvas.
Playback of my test GM works correctly on both raster and GPU, in all three modes.

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

Review URL: https://codereview.chromium.org/1893393002
2016-04-19 10:16:53 -07:00
cdalton
1bf3e71ad0 Add optional data parameter to createBuffer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877073002

Review URL: https://codereview.chromium.org/1877073002
2016-04-19 10:00:02 -07:00
robertphillips
44583122ac Make skpinfo more human friendly
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1901713004

Review URL: https://codereview.chromium.org/1901713004
2016-04-19 09:29:01 -07:00
brianosman
3c579dcff8 Move DM png code to picture_utils, for use by other tools.
Planning to re-use this code in skiaserve in an upcoming change.

TBR=mtklein@google.com

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

Review URL: https://codereview.chromium.org/1901113002
2016-04-19 09:18:11 -07:00
halcanary
f0da138c95 experimental/fiddle -> tools/fiddle
also, test building fiddle_main.cpp & draw.cpp
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1895143002

Review URL: https://codereview.chromium.org/1895143002
2016-04-18 11:50:07 -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
rmistry
5f80e8cb7c Walk through files in parse_llvm_coverage.py instead of using 'git ls-files'
The script will be executed on a swarming bot where we do not want to isolate .git directories.

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

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1888423002
2016-04-18 04:18:56 -07:00
rmistry
43e8f67254 Do not do compile steps for Coverage
Coverage needs to do compilation in its test step. The primary reason is: the path to the out directory is compiled into the binary, which is why the compile and test steps need to be combined.

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

Review URL: https://codereview.chromium.org/1889183002
2016-04-18 04:14:17 -07:00
brianosman
1c9f9228e5 Fix skiaserve crash when displaying batch bounds
In my test case, the first actual batch would combine with the clear
issued before auditing had been enabled. After the successful combine,
we would try to inform the audit manager, but it didn't know about the
batch, triggering an assert (and subsequent crash). Fix is ijust to
ensure that no prior batches are pending when we turn on auditing.

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

Review URL: https://codereview.chromium.org/1894633002
2016-04-15 11:00:51 -07:00
bsalomon
3f21a2e9f3 Only eglTerminate command buffer displays when no displays are in use
This is a workaround for crbug.com/603223

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

Review URL: https://codereview.chromium.org/1878943008
2016-04-13 15:03:59 -07:00
brianosman
b461d34575 Rename lots of things from 'sRGB' to 'GammaCorrect', where appropriate
Trying to be much more explicit about where we really mean sRGB as a format,
and where we mean gamma-correct, as in: "not legacy behavior". Most of the
changes to rendering behavior are dependent on the latter, so let's be precise.

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

Review URL: https://codereview.chromium.org/1884873006
2016-04-13 13:10:14 -07:00
bsalomon
09e127bd38 Make build_shaderc.py blow away output dir and allow build_type arg to contain either Debug or Release
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1884963002

Review URL: https://codereview.chromium.org/1884963002
2016-04-13 08:02:43 -07:00
borenet
903ec3ce4d Fix CommandBuffer bot's DM config
BUG=skia:4957
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880403002

Review URL: https://codereview.chromium.org/1880403002
2016-04-13 06:00:42 -07:00
bungeman
ed2edabd07 Remove SK_VERY_LEGACY_CREATE_TYPEFACE.
The flag and code it guards are no longer used.

TBR=reed
This just removes dead code.

Review URL: https://codereview.chromium.org/1882803002
2016-04-13 05:23:35 -07:00
bungeman
11a77c6e06 Begin switch to SkFontStyle for legacy calls.
This adds SK_VERY_LEGACY_CREATE_TYPEFACE which, when defined, provides
only the old interface.

Ideally, everyone would switch directly to SkFontMgr and use one of the
newer calls, but there is currently no path for current users to get
there. This updates all the internals to use SkFontStyle, after
switching these over the higher level APIs can be switched.

The Chromium follow on patch can be seen at https://crrev.com/1877673002

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

TBR=reed
This doesn't really change API, just modernizes it.

Review URL: https://codereview.chromium.org/1873923002
2016-04-12 13:45:06 -07:00
borenet
71e185c060 GYP_DEFINES and DM flags for Vulkan bot
BUG=skia:5186
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885563002

Review URL: https://codereview.chromium.org/1885563002
2016-04-12 08:13:57 -07:00
bsalomon
dc0fcd41e7 Vulkan config in dm
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1872283003

Review URL: https://codereview.chromium.org/1872283003
2016-04-11 14:21:33 -07:00
mtklein
ad6a1901d1 nullptr -> "sans-serif" fixes bold in gm/colorwheel
This was an odd case where 8888 drew wrong and serialize-8888 was correct.

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

Review URL: https://codereview.chromium.org/1880653002
2016-04-11 13:20:11 -07:00
borenet
48b88cc1f6 Fixes for CommandBuffer bot
BUG=skia:4957
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877883002

Review URL: https://codereview.chromium.org/1877883002
2016-04-11 10:16:01 -07:00
egdaniel
2a0bb0a665 Fix to zoom on Vulkan Viewer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1876853003

Review URL: https://codereview.chromium.org/1876853003
2016-04-11 08:30:40 -07:00
jvanverth
c265a92741 More cleanup in the Vulkan viewer
* add animation support for GMs
* don't load all SkPictures at start, only as needed
* don't update constantly, only for animation or stats
* hide/show stats
* scale slides up/down

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

Review URL: https://codereview.chromium.org/1873733003
2016-04-08 12:51:45 -07:00
mtklein
0576aa9c07 Serialize invNormRotation in SkLightingShader.
This fixes a serialize-8888 / 8888 GM mismatch.

This requires a picture bump so we know not to bother trying to read the
invNormRotation vector from older .SKPs.   Any chance no one's ever made
one?

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

Just bumping the picture version.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1870443002
2016-04-08 12:19:50 -07:00
jvanverth
2bb3b6d2bb Add slides to VulkanViewer
Adds SKP loading, matching, and moving backwards as well as forwards
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873543003

Review URL: https://codereview.chromium.org/1873543003
2016-04-08 07:24:09 -07:00
cdalton
e2e71c2df4 Track GL buffer state based on unique resource ID
Reworks GrGLGpu to track GL buffer state based on the unique
GrGpuResource ID. This eliminates the need to notify the gpu object
whenever a buffer is deleted.

This change also allows us to remove the type specifier from GrBuffer.
At this point a buffer is just a chunk of memory, and the type
given at creation time is just a suggestion to the GL backend about
which target to bind to for updates.

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

Committed: https://skia.googlesource.com/skia/+/deacc97bc63513b5eacaf21f858727f6e8b98ce5

Review URL: https://codereview.chromium.org/1854283004
2016-04-07 18:13:29 -07:00
jvanverth
3d6ed3ae75 Some more improvements/fixes to the VulkanViewer
* display GM name in title bar
* add ms timer for update loop
* add ms/frame meter
* fix vsync
* add some notes for later

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

Review URL: https://codereview.chromium.org/1873453002
2016-04-07 11:09:51 -07:00
mtklein
044d3c1858 Revert of Track GL buffer state based on unique resource ID (patchset #6 id:100001 of https://codereview.chromium.org/1854283004/ )
Reason for revert:
Chrome roll's broken, seems to be missing fTarget:

https://codereview.chromium.org/1861473005

Original issue's description:
> Track GL buffer state based on unique resource ID
>
> Reworks GrGLGpu to track GL buffer state based on the unique
> GrGpuResource ID. This eliminates the need to notify the gpu object
> whenever a buffer is deleted.
>
> This change also allows us to remove the type specifier from GrBuffer.
> At this point a buffer is just a chunk of memory, and the type
> given at creation time is just a suggestion to the GL backend about
> which target to bind to for updates.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854283004
>
> Committed: https://skia.googlesource.com/skia/+/deacc97bc63513b5eacaf21f858727f6e8b98ce5

TBR=bsalomon@google.com,jvanverth@google.com,cdalton@nvidia.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/1870553002
2016-04-06 18:24:34 -07:00
mtklein
11064dfeb4 Fix lazy coding in ViaSingletonPictures.
I was using SkRect::MakeLargest() as bounds, which is sort of nutso,
as that clearly is way out of bounds for how big a picture can feasibly
be, i.e. something closer to SkIRect::MakeLargest().

This was causing spurious quick rejects in drawPatch().  I didn't really
look much deeper to figure out why.  It's easy enough to just feed it the
proper bounds of the entire content.

This means patch_primitive draws correctly in sp-8888 mode.
I also noticed the GM was too small... it clipped off most of its content.
So I've made it larger.

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

Review URL: https://codereview.chromium.org/1865143002
2016-04-06 15:01:57 -07:00
cdalton
deacc97bc6 Track GL buffer state based on unique resource ID
Reworks GrGLGpu to track GL buffer state based on the unique
GrGpuResource ID. This eliminates the need to notify the gpu object
whenever a buffer is deleted.

This change also allows us to remove the type specifier from GrBuffer.
At this point a buffer is just a chunk of memory, and the type
given at creation time is just a suggestion to the GL backend about
which target to bind to for updates.

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

Review URL: https://codereview.chromium.org/1854283004
2016-04-06 14:26:34 -07:00
mtklein
48156ed412 path_stroke_with_zero_length: turn off drawFat() by default.
The replay modes cannot readback, and so cannot draw the fat parts, which
means we've had to exempt them from checking that they draw identically.

I don't mind if we leave it alone, but I thought I'd check to see your opinion.

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

Review URL: https://codereview.chromium.org/1862113004
2016-04-06 14:25:35 -07:00
bsalomon
758586c7f1 Make existing unit tests only run on GL contexts
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869503002

Review URL: https://codereview.chromium.org/1869503002
2016-04-06 14:02:39 -07:00
mtklein
9e65f9399e alternate textblobgeometrychange fix... just make our own surface if needed
This should decopple fixing the replay modes from revising the API.

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

Review URL: https://codereview.chromium.org/1868553005
2016-04-06 13:57:38 -07:00
mtklein
3d72c099c7 Remove conditional flavor text on blend GM.
This was breaking replay modes for no good reason.

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

Review URL: https://codereview.chromium.org/1864253002
2016-04-06 12:42:49 -07:00
mtklein
083b869f50 Register SkLocalMatrixImageFilter for serialization.
This fixes one of the zillions of serialize-8888 backlisted tests.

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

Review URL: https://codereview.chromium.org/1868453003
2016-04-06 12:27:07 -07:00
jvanverth
9fab59d3a6 Clean up input handling in VulkanViewer
Sets up proper handling of characters and keycodes, and event modifiers.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1865553005

Review URL: https://codereview.chromium.org/1865553005
2016-04-06 12:08:51 -07:00
bsalomon
3ddf967ffe Alter dm_flags.py logic flow for certain configs to be subtractive
Replace msaa4 on Shield Tablet with glmsaa4.

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

Review URL: https://codereview.chromium.org/1868473003
2016-04-06 09:22:36 -07:00
bsalomon
885b677b10 Add exclusion for keymobi_shop_mobileweb_ebay_com.skp on N5
BUG=skia:5178
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1857123005

Review URL: https://codereview.chromium.org/1857123005
2016-04-06 08:35:15 -07:00
brianosman
898235c486 SkSurfaceProps now has a gamma-correct ("AllowSRGBInputs") flag. That's propagated in a few places so that the backend can do the right thing for L32 vs S32 mode.
Also added SkSurfaceProps to SkSpecialImage, so that Image -> Surface conversion can preserve the desired behavior during filtering.

Many small changes, including a bunch of comments about places where we may be losing information right now. My approach was to ensure that if anything fails, it will always fall back to "legacy" mode - gamma-correctness is opt-in, so I'll just have to feed things through as missing cases are exposed.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1838953007

Review URL: https://codereview.chromium.org/1845283003
2016-04-06 07:38:23 -07:00
jvanverth
9f37246d68 First pass at VulkanViewer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1848833005

Review URL: https://codereview.chromium.org/1848833005
2016-04-06 06:08:59 -07:00
bsalomon
f2f1c17e33 One signature for creating unit tests that run on premade GrContexts
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1860593002

Review URL: https://codereview.chromium.org/1860593002
2016-04-05 12:59:06 -07:00
borenet
d32eac278e Set 'device_cfg' parameter for iOS bots
For https://codereview.chromium.org/1859993003/

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

Review URL: https://codereview.chromium.org/1862723002
2016-04-05 12:14:59 -07:00
brianosman
235cbf23c4 Create output directory in skdiff
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1865563002

Review URL: https://codereview.chromium.org/1865563002
2016-04-05 11:37:49 -07:00
bsalomon
85b4b53e78 Rename enums in GrContextFactory to remove "GL"
Also, remove kNative as a separate context type and instead make it an alias for kGL or kGLES based on OS.

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

Committed: https://skia.googlesource.com/skia/+/2d9c6f81353597aebf5934547e5cba7a872196fb

Review URL: https://codereview.chromium.org/1845923004
2016-04-05 11:06:27 -07:00