Commit Graph

21742 Commits

Author SHA1 Message Date
robertphillips
23d2c18cb1 Fix scaledstrokes GM
Small fix to https://codereview.chromium.org/1873733003 (More cleanup in the Vulkan viewer)

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

Review URL: https://codereview.chromium.org/1875793002
2016-04-08 14:03:00 -07:00
robertphillips
651bb5fafe Make some GMs animate
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1870133003

Review URL: https://codereview.chromium.org/1870133003
2016-04-08 13:35:14 -07:00
egdaniel
7cbffda6c8 Don't create new descriptor set for vulkan uniforms every draw
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1872553005

Review URL: https://codereview.chromium.org/1872553005
2016-04-08 13:27:53 -07:00
herb
9e0efe57ac Add clone to Stage. Rename place to mix and PolymorphicUnion to Stage. Cleanup.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877483002

Review URL: https://codereview.chromium.org/1877483002
2016-04-08 13:25:28 -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
reed
377add7426 Fix race condition in SkROBuffer.
SkBufferBlock::fUsed may be updated by the writer while a reader is
attempting to read it.

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

Review URL: https://codereview.chromium.org/1872853002
2016-04-08 12:47:14 -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
robertphillips
646125114b Upgrade SkSpecialImage to have getTextureRef & getROPixels entry points
This more closely aligns the SkSpecialImage API with the SkImage API. In doing so it allows the image filters to handle SkImages that can sneak through while remaining encoded (e.g., if an input filter just returns a wrapped version of the source SkImage)

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

Review URL: https://codereview.chromium.org/1861643003
2016-04-08 12:10:42 -07:00
halcanary
89c2a0b8c1 SkPDF: Fix links to be more valid PDF/A
See:
  https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-632-1
  https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-632-2

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

Review URL: https://codereview.chromium.org/1867003004
2016-04-08 10:51:05 -07:00
halcanary
050ab5d858 SkPDF: fix pessimizing-move in PDFA code
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1863393004

Review URL: https://codereview.chromium.org/1863393004
2016-04-08 09:55:21 -07:00
bungeman
20f313bea7 Increase request cache size.
BUG=chromium:424082
See comment #63.

Review URL: https://codereview.chromium.org/1875733002
2016-04-08 08:57:00 -07:00
robertphillips
ef6a47b4af Update MatrixConvolutionImageFilter to sk_sp
TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1869833002
2016-04-08 08:01:20 -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
bungeman
53d5c6e744 Test CTFonts for equality, not just name and style.
The current code looks up CTFonts from descriptors by just name and style.
This is not sufficient, for example Avenir Book and Avenir Roman have the
same family name but the same basic style, but are obviously not the same.

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

Review URL: https://codereview.chromium.org/1860993004
2016-04-08 07:22:29 -07:00
bungeman
2c4bd0798e Convert SkRefCnt to std::atomic.
This enables removing the more complicated atomic shims from SkAtomics.h.

TBR=reed
This doesn't actually change any API.

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot,Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Release-TSAN-Trybot

Review URL: https://codereview.chromium.org/1867863002
2016-04-08 06:58:52 -07:00
herb
6a5d7139ff Add specialized rgba8888 unit sampler.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1868723003

Review URL: https://codereview.chromium.org/1868723003
2016-04-08 06:49:59 -07:00
brianosman
a1e8f8d8f1 Decouple contrast boost from fake gamma.
Replace FakeGamma with FontWeightFlags. Largely mechanical, except for
the changes in ignorePreBlend. With this change, text GMs generally look
the same (or at least more similar) in 8888/srgb/gpu/gpusrgb configs.

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=1866293003

Review URL: https://codereview.chromium.org/1866293003
2016-04-08 06:47:54 -07:00
robertphillips
b63c5766c3 More valgrind appeasement
BUG=skia:5164
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1867973004

Review URL: https://codereview.chromium.org/1867973004
2016-04-08 05:24:21 -07:00
hcm
23f9a8486c Update Skia milestone to 52
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1868893003

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1868893003
2016-04-07 22:58:19 -07:00
fmalita
e7365065ac Revert of For *ToFixed, in debug mode, assert that the value is in range. (patchset #6 id:140001 of https://codereview.chromium.org/1824733002/ )
Reason for revert:
Asserts in Blink rolls:

https://storage.googleapis.com/chromium-layout-test-archives/linux_blink_rel/84520/layout-test-results/results.html

STDERR: [1:1:0407/120919:1455366829:INFO:SkFixed.h(88)] ../../third_party/skia/include/private/SkFixed.h:88: fatal error: ""truncf(x * (1 << 16)) == static_cast<float>

Original issue's description:
> For *ToFixed, in debug mode, assert that the value is in range.
>
> Use SkFloatPinToFixed in SkTwoPointConicalGradient.cpp because it is failing in DM. fmalita is working on replacing this code with the 4f version, so I'm not bothering to fix it. (The beginnings of a real fix are in https://codereview.chromium.org/1767163003, which I do not plan to commit.)
>
> BUG=skia:4632
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1824733002
>
> Committed: https://skia.googlesource.com/skia/+/93dc33972cd6a418e84270298b856d2de08d9c1c

TBR=mtklein@google.com,reed@google.com,benjaminwagner@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4632

Review URL: https://codereview.chromium.org/1868933004
2016-04-07 19:27:45 -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
lsalzman
8dea4e41a1 add header guard to SkPM4fPriv.h to prevent accidental multiple inclusion
This works around some issues with Firefox's unified sources build system.

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

Review URL: https://codereview.chromium.org/1869613003
2016-04-07 14:04:32 -07:00
egdaniel
5f3b0e00fb Limit the size of descriptor pools in vulkan
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1867973002

Review URL: https://codereview.chromium.org/1867973002
2016-04-07 13:49:01 -07:00
fmalita
eadf3cf899 [4fGradient] Veto blitters for non-opaque paints
The current blitters don't support SrcOver, so we must ensure the colors
are opaque.  Checking shader.colorsAreOpaque() is not enough as it
doesn't reflect the paint alpha.

Instead we should check for context flags & kOpaqueAlpha_Flag, which is
only set when both the color stops AND the paint are opaque.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1870773002

Review URL: https://codereview.chromium.org/1870773002
2016-04-07 13:16:13 -07:00
halcanary
78daeff1f9 SkPDF Fix PDF/A to be more valid
Some produced PDFs are recognized by veraPDF 0.13.2
(http://verapdf.org/software/) as valid PDF/A-2B.

BUG=skia:4535

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

Review URL: https://codereview.chromium.org/1864173004
2016-04-07 12:35:00 -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
kjlubick
312398159c Add support for pyadb to setup_adb.sh
BUG=skia:5156
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869813002

Review URL: https://codereview.chromium.org/1869813002
2016-04-07 10:57:27 -07:00
egdaniel
8af936d304 Fix a bunch of memory issues in Vulkan
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1867883002

Review URL: https://codereview.chromium.org/1867883002
2016-04-07 10:17:47 -07:00
benjaminwagner
93dc33972c For *ToFixed, in debug mode, assert that the value is in range.
Use SkFloatPinToFixed in SkTwoPointConicalGradient.cpp because it is failing in DM. fmalita is working on replacing this code with the 4f version, so I'm not bothering to fix it. (The beginnings of a real fix are in https://codereview.chromium.org/1767163003, which I do not plan to commit.)

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

Review URL: https://codereview.chromium.org/1824733002
2016-04-07 09:52:19 -07:00
benjaminwagner
70f1a6c64e Add pinned versions of *ToFixed.
BUG=skia:4632
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1707023002

Review URL: https://codereview.chromium.org/1707023002
2016-04-07 09:23:12 -07:00
robertphillips
73add93a9c Appease valgrind wrt testing code initialization
The new swarming valgrind bot appears to be higher maintenance. These changes seem harmless and will, hopefully, unblock the bot.

TBR=bsalomon@google.com

https://build.chromium.org/p/client.skia.fyi/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-SwarmingValgrind/builds/57

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

Review URL: https://codereview.chromium.org/1867053002
2016-04-07 09:01:20 -07:00
halcanary
8cd4a24236 SkPDF: fix PDF/A
TODO: get a bot to start testing this.

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

Review URL: https://codereview.chromium.org/1864163004
2016-04-07 08:56:15 -07:00
benjaminwagner
6c71e0a065 Reverse dependency between SkScalar.h and SkFixed.h.
The following are unused in Chromium, Android, Mozilla, and Google3:
 - SkFixedToScalar
 - SkScalarToFixed

The following are additionally unused in Skia:
 - SkStrAppendFixed
 - SkWriteBuffer::writeFixed

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

Review URL: https://codereview.chromium.org/1841123002
2016-04-07 08:49:31 -07:00
robertphillips
6f01104b1d Revert conversion of SkColorFilterImageFilter to new API
BUG=598028

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

Review URL: https://codereview.chromium.org/1864263002
2016-04-07 08:10:45 -07:00
herb
303c979b82 Use a faster repeat tiler when translate only matrix.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1861253003

Review URL: https://codereview.chromium.org/1861253003
2016-04-07 07:56:12 -07:00
egdaniel
ef0c10cffe Fix vulkan layer callback bug
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1870673002

Review URL: https://codereview.chromium.org/1870673002
2016-04-07 07:51:23 -07:00
robertphillips
11171f3b66 Update MagnifierImageFilter to sk_sp
TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1864843002
2016-04-07 07:34:15 -07:00
brianosman
32f7782706 sRGB text fake-gamma progress:
Determine if we should use fake-gamma based on the render target format
and paint parameters (ie will gamma-correct blending happen?). Plumb that
down to the appropriate places in the bitmap text rendering for now.

Still need to alter the behavior of the DF text renderer (using the same
cue, most likely?). Also, this still doesn't account for the contrast
hack. The end result of this change is a pleasant normalizing of weight
when viewing text in the gpusrgb config. (Dark text gets heavier, light
text gets lighter).

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

Review URL: https://codereview.chromium.org/1865953003
2016-04-07 06:25:45 -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
msarett
6e077e140a Mark webps as sRGB
This may cause some diffs in Gold.

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

Review URL: https://codereview.chromium.org/1838603002
2016-04-06 15:45:41 -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
egdaniel
b4aa36211c Switch uniforms to be descriptor set 0 in Vulkan
This (plus some cleanup) gives us some minor perf gains and as a side effect
the perf debug layer no longer complains when we bind certain descriptor sets.

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

Review URL: https://codereview.chromium.org/1864303002
2016-04-06 13:47:08 -07:00
cdalton
a957b8a114 Fix null context GenBuffers
Fixes the null context to not return 0 for GenBuffers.

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

Review URL: https://codereview.chromium.org/1863923003
2016-04-06 13:36: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