Commit Graph

2536 Commits

Author SHA1 Message Date
bungeman
5379051ee7 Fix SkScalerContext_FreeType::generateFontMetrics.
SkScalerContext::generateFontMetrics implementations should not attempt
to take into account skew. This implementation should correctly handle
bitmap fonts as well.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165323002

Review-Url: https://codereview.chromium.org/2165323002
2016-07-21 13:32:09 -07:00
dvonbeck
680e2e9a9e Fixed GM:lightingshader2 size
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2171853002

Review-Url: https://codereview.chromium.org/2171853002
2016-07-21 12:19:54 -07:00
brianosman
dddbe380b0 Adding an SkColorSpace to SkImage_Gpu
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165703003

Review-Url: https://codereview.chromium.org/2165703003
2016-07-20 13:55:39 -07:00
dvonbeck
c526da94e4 SkLS now accepting nullptr for diffuse shader and normal source, now accurately handling alpha
This CL's base is the CL for taking in a diffuse shader into SkLS on the API side: https://codereview.chromium.org/2064153002

BUG=skia:5502,skia:5517
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132113002

Review-Url: https://codereview.chromium.org/2132113002
2016-07-20 11:20:30 -07:00
brianosman
54f30c13fc Introduce GrColorSpaceXform, for gamut conversion on textures
GrTextureAccess optionally includes an instance, computed from the src
and dst color spaces. In all common cases (no color space for either src
or dst, or same color space for both), no object is allocated.

This change is orthogonal to my attempts to get color space attached to
render targets - regardless of how we choose to do that, this will give
us the source color space at all points where we are connecting src to
dst.

There are many dangling injection points where I've been inserting
nullptr, but I have a record of all of them. Additionally, there are now
three places (the most common simple paths for bitmap/image rendering)
where things are plumbed enough that I expect to have access to the dst
color space (all marked with XFORMTODO).

In addition to getting the dst color space, I need to inject shader code
and uniform uploading for appendTextureLookup and friends.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154753003

Review-Url: https://codereview.chromium.org/2154753003
2016-07-18 10:53:52 -07:00
halcanary
39f988eb41 SkPDF: Always give a default advance for glyphs.
Prior to this we assumed the default default was 0.  It is
actually 1000, according to the spec.

fixes BUG=skia:5321
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146403005

Review-Url: https://codereview.chromium.org/2146403005
2016-07-15 12:54:30 -07:00
mtklein
6e21efd842 Probably no need for GM self-tests now that GM doesn't exist.
This is... belated.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154603002

Review-Url: https://codereview.chromium.org/2154603002
2016-07-14 19:39:38 -07:00
bsalomon
7cf36ccb44 Stop testing texture-backed bitmaps in drawbitmaprect GM
BUG=skia:5531
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2148793003

Review-Url: https://codereview.chromium.org/2148793003
2016-07-14 09:33:42 -07:00
bsalomon
614d8f9a3c Remove GrWrapTextureInBitmap from public API
BUG=skia:5531
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147053002

Review-Url: https://codereview.chromium.org/2147053002
2016-07-13 15:42:40 -07:00
bsalomon
a2e0837c33 Stop testing texture-backed bitmaps in bleed GMs
BUG=skia:5531

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2141973004

Review-Url: https://codereview.chromium.org/2141973004
2016-07-13 14:50:17 -07:00
bungeman
f382b48687 Disable aliased font test on iOS.
See if not requesting aliased text fixes iOS.

BUG=skia:5530

TBR=mtklein

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2150483003

Review-Url: https://codereview.chromium.org/2150483003
2016-07-13 14:00:39 -07:00
csmartdalton
97f6cd5d0f Pre-crop filled rects to avoid scissor
Updates GrDrawContext to crop filled rects to the clip bounds before
creating batches for them. Also adds clipping logic to ignore scissor
when the draw falls completely inside. These two changes combined
reduce API traffic and improve batching.

In the future this can and should be improved by switching to floating
point clip boundaries, thus allowing us to throw out non pixel aligned
rectangle clips as well.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002

Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
Committed: https://skia.googlesource.com/skia/+/86de59f4a99b5f54be0483c60ff0335be55b2bdf
Review-Url: https://codereview.chromium.org/2132073002
2016-07-13 13:37:08 -07:00
robertphillips
dda54455a2 Remove GrLayerHoister
This relies on https://codereview.chromium.org/1944013002/ (Add legacy flag to allow Skia to remove Ganesh layer hoister) landing first so as to not break the DEPS roll.

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

Review-Url: https://codereview.chromium.org/1950523002
2016-07-13 13:27:16 -07:00
bungeman
82945560e6 Disable embedded bitmap test on iOS.
The TypefaceRenderingGM crashes on iOS when drawing an embedded
bitmap when requesting aliased rendering. The crash looks like

libTrueTypeScaler.dylib`<redacted> + 80
stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=...)
->  0x330b19d0 <+80>: strd   r2, r3, [r5, #36]
    0x330b19d4 <+84>: movs   r3, #0x0
    0x330b19d6 <+86>: add    r2, sp, #0x28
    0x330b19d8 <+88>: ldr    r0, [r4, #0x4]

Disable testing embedded bitmaps on iOS for now.

BUG=skia:5530

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2140383004

Review-Url: https://codereview.chromium.org/2140383004
2016-07-13 10:57:24 -07:00
msarett
ba3880fa6d Revert of Pre-crop filled rects to avoid scissor (patchset #6 id:100001 of https://codereview.chromium.org/2132073002/ )
Reason for revert:
I think this is still causing a test failure on Chrome windows bots.

https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/243928/steps/cc_unittests%20%28with%20patch%29%20on%20Windows-7-SP1/logs/stdio

Original issue's description:
> Pre-crop filled rects to avoid scissor
>
> Updates GrDrawContext to crop filled rects to the clip bounds before
> creating batches for them. Also adds clipping logic to ignore scissor
> when the draw falls completely inside. These two changes combined
> reduce API traffic and improve batching.
>
> In the future this can and should be improved by switching to floating
> point clip boundaries, thus allowing us to throw out non pixel aligned
> rectangle clips as well.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002
>
> Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
> Committed: https://skia.googlesource.com/skia/+/86de59f4a99b5f54be0483c60ff0335be55b2bdf

TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@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/2140253004
2016-07-12 18:48:21 -07:00
reed
7c70d7cfa2 center glyphs for text-on-path-via-rsxform
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2137083005

Review-Url: https://codereview.chromium.org/2137083005
2016-07-12 15:06:33 -07:00
bungeman
7438bfc080 Factor code to rotate a canvas about a point.
SkMatrix::scale and ::rotate take a point around which to scale or rotate.
Canvas lacks these helpers, so the code to rotate a canvas around a
point has been duplicated many times. Factor all of these
implementations into SkCanvas::rotate.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142033002

Review-Url: https://codereview.chromium.org/2142033002
2016-07-12 15:01:19 -07:00
csmartdalton
86de59f4a9 Pre-crop filled rects to avoid scissor
Updates GrDrawContext to crop filled rects to the clip bounds before
creating batches for them. Also adds clipping logic to ignore scissor
when the draw falls completely inside. These two changes combined
reduce API traffic and improve batching.

In the future this can and should be improved by switching to floating
point clip boundaries, thus allowing us to throw out non pixel aligned
rectangle clips as well.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002

Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
Review-Url: https://codereview.chromium.org/2132073002
2016-07-12 14:45:23 -07:00
bungeman
5dba301e91 Use hintgasp font when testing rendering.
The hintgasp font was added specifically for the typefacerendering gm.
However, this gm didn't actually use the font, so now use it. In
addition this adds embedded bitmap strikes to the hintgasp font and the
gm is updated to test these as well.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2140863002

NOTREECHECKS=true
Test only change, does not affect users.

Review-Url: https://codereview.chromium.org/2140863002
2016-07-12 06:55:25 -07:00
msarett
aeadcdfbf2 Revert of Pre-crop filled rects to avoid scissor (patchset #6 id:100001 of https://codereview.chromium.org/2132073002/ )
Reason for revert:
I believe that this is breaking the roll.

https://codereview.chromium.org/2141923002

https://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/258434/steps/cc_unittests%20%28with%20patch%29%20on%20Mac-10.9/logs/stdio

Original issue's description:
> Pre-crop filled rects to avoid scissor
>
> Updates GrDrawContext to crop filled rects to the clip bounds before
> creating batches for them. Also adds clipping logic to ignore scissor
> when the draw falls completely inside. These two changes combined
> reduce API traffic and improve batching.
>
> In the future this can and should be improved by switching to floating
> point clip boundaries, thus allowing us to throw out non pixel aligned
> rectangle clips as well.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002
>
> Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a

TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@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/2145573002
2016-07-12 05:40:39 -07:00
csmartdalton
7969838702 Pre-crop filled rects to avoid scissor
Updates GrDrawContext to crop filled rects to the clip bounds before
creating batches for them. Also adds clipping logic to ignore scissor
when the draw falls completely inside. These two changes combined
reduce API traffic and improve batching.

In the future this can and should be improved by switching to floating
point clip boundaries, thus allowing us to throw out non pixel aligned
rectangle clips as well.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002

Review-Url: https://codereview.chromium.org/2132073002
2016-07-11 14:34:12 -07:00
dvonbeck
6af677ff8f Changed SkLightingShader API to take in a shader as color source
This CL's base is the CL for the same modification, but in the implementation side: https://codereview.chromium.org/2062703003/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2064153002

Review-Url: https://codereview.chromium.org/2064153002
2016-07-10 18:38:34 -07:00
reed
dde2b1f1a8 update path->rsxform to correctly interp dy
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2131043002

TBR=

Review-Url: https://codereview.chromium.org/2131043002
2016-07-08 03:31:09 -07:00
reed
45561a0b15 drawTextRSXform
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2130643004

Review-Url: https://codereview.chromium.org/2130643004
2016-07-07 12:47:17 -07:00
dvonbeck
5b794fad18 API change to allow for NormalSource selection at the user level.
This CL's base is the CL for CPU handling: https://codereview.chromium.org/2050773002/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2063793002

Review-Url: https://codereview.chromium.org/2063793002
2016-07-06 13:58:36 -07:00
bungeman
61457a6b80 Add gm for various font rendering combinations.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2080453002

Review-Url: https://codereview.chromium.org/2080453002
2016-07-06 11:55:05 -07:00
bsalomon
a7d85ba138 Add gm that tests shaded stroked rectangles.
Fix GPU handling of previously untested cases.

Move rect->path fallback from SkGpuDevice to GrDrawContext.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2125663003

Review-Url: https://codereview.chromium.org/2125663003
2016-07-06 11:54:59 -07:00
bsalomon
9c67381dbc Enlarge strokerect GM size to reveal hidden content
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2126723002

Review-Url: https://codereview.chromium.org/2126723002
2016-07-06 06:30:36 -07:00
reed
81700f69b0 remove DownSample imagefilter
was just created early on as a test filter

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2094083002

TBR=

Review-Url: https://codereview.chromium.org/2094083002
2016-06-25 14:30:44 -07:00
brianosman
e074d1fa6a Change SkColor4f to RGBA channel order
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2093763003

Review-Url: https://codereview.chromium.org/2093763003
2016-06-24 06:31:47 -07:00
robertphillips
28a838e532 Move GrPipelineBuilder out of gms & reduce use of GrPipelineBuilder.h
Just another step in reining in the GrPLB

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2086293006

Review-Url: https://codereview.chromium.org/2086293006
2016-06-23 14:07:00 -07:00
brianosman
42a41499de Change loop bounds to be correct (and much less confusing)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2095693002

Review-Url: https://codereview.chromium.org/2095693002
2016-06-23 11:40:14 -07:00
fmenozzi
17b64b2fd4 Add GM for hard stop gradients
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087273002

Review-Url: https://codereview.chromium.org/2087273002
2016-06-22 13:39:25 -07:00
brianosman
6efeda4838 Revert of Store mipmap levels in deferred texture image (patchset #15 id:280001 of https://codereview.chromium.org/2034933003/ )
Reason for revert:
Crashes on a few different bots (including ASAN). Examples:

https://build.chromium.org/p/client.skia.android/builders/Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release/builds/6324
https://build.chromium.org/p/client.skia/builders/Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug/builds/5400
https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/3539

Original issue's description:
> Store mipmap levels in deferred texture image
>
> When creating the deferred texture image, detect if using medium / high
> quality. If so, generate and store mipmaps in the deferred texture
> image.
>
> When creating a texture from that be sure to read it back out.
>
> BUG=578304
> R=bsalomon@google.com
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2034933003
>
> Committed: https://skia.googlesource.com/skia/+/b3105190a6e02d37f1d7f07a3a8bdd368ec7f157

TBR=bsalomon@google.com,ericrk@chromium.org,cblume@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=578304

Review-Url: https://codereview.chromium.org/2083393002
2016-06-22 07:10:06 -07:00
fmenozzi
b105cff6e2 Remove bubbles GM
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087263002

Review-Url: https://codereview.chromium.org/2087263002
2016-06-22 06:36:26 -07:00
cblume
b3105190a6 Store mipmap levels in deferred texture image
When creating the deferred texture image, detect if using medium / high
quality. If so, generate and store mipmaps in the deferred texture
image.

When creating a texture from that be sure to read it back out.

BUG=578304
R=bsalomon@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2034933003

Review-Url: https://codereview.chromium.org/2034933003
2016-06-21 13:43:13 -07:00
brianosman
79b15f60f4 Add new GM that exercises Gray 8 mipmapping and sRGB-ness
This demonstrates the bug that was fixed by:
  https://codereview.chromium.org/2088883002/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087933002

Review-Url: https://codereview.chromium.org/2087933002
2016-06-21 13:40:12 -07:00
brianosman
473466c017 Reorder colorspaces in GM to match previous behavior
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2088493002

Review-Url: https://codereview.chromium.org/2088493002
2016-06-20 14:43:00 -07:00
brianosman
52ede1d905 More removal of SkColorProfileType...
Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with
the command line flag that was setting it in DM and nanobench.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002

Committed: https://skia.googlesource.com/skia/+/944876f2745a62a839e49275daf93a0329372e67
Review-Url: https://codereview.chromium.org/2071393002
2016-06-20 08:25:02 -07:00
egdaniel
802acec187 Revert of More removal of SkColorProfileType... (patchset #2 id:20001 of https://codereview.chromium.org/2071393002/ )
Reason for revert:
This was still used in chrome

Original issue's description:
> More removal of SkColorProfileType...
>
> Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with
> the command line flag that was setting it in DM and nanobench.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002
>
> Committed: https://skia.googlesource.com/skia/+/944876f2745a62a839e49275daf93a0329372e67

TBR=msarett@google.com,reed@google.com,bsalomon@google.com,brianosman@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/2074103004
2016-06-17 15:11:46 -07:00
brianosman
944876f274 More removal of SkColorProfileType...
Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with
the command line flag that was setting it in DM and nanobench.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002

Review-Url: https://codereview.chromium.org/2071393002
2016-06-17 13:43:27 -07:00
msarett
c4ce6b5924 Differentiate between sRGBGamma and 2Dot2Gamma
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2067833003

Review-Url: https://codereview.chromium.org/2067833003
2016-06-16 07:37:41 -07:00
bsalomon
f130b8299b Actually fix leak in deferred_texture_image_data
TBR=egdaniel@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2068863003

Review-Url: https://codereview.chromium.org/2068863003
2016-06-15 09:00:21 -07:00
bsalomon
85730abbf8 Fix leak of GrContextThreadSafeProxy in deferred_texture_image_data
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069443004

Review-Url: https://codereview.chromium.org/2069443004
2016-06-14 14:44:28 -07:00
msarett
be36d59e66 Fix SkImage::asLegacyBitmap() to respect color space info
BUG=skia:5428
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2061783002

Review-Url: https://codereview.chromium.org/2061783002
2016-06-13 11:25:03 -07:00
ericrk
b4da01d8f7 Add prescale option to deferred params
Currently, Skia always uploads GPU textures at full resolution. This
change allows us to pass a pre-scale mip level to the
deferred texture image logic, which causes us to pre-scale the image
to the given mip level, and upload that mip level instead of the full
image.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2007113008

Review-Url: https://codereview.chromium.org/2007113008
2016-06-13 11:18:14 -07:00
reed
3cc37d3db3 tweak mipmap_srgb gm to use integer coordinates
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2061553002

TBR=

Review-Url: https://codereview.chromium.org/2061553002
2016-06-11 04:48:12 -07:00
reed
8151103535 fix non-square stroke rects (non-aa)
fiddle showing bug: https://fiddle.skia.org/c/a21ecf5e33da84f52eba26e8c2f3d280

BUG=skia:5408
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2060543002

Review-Url: https://codereview.chromium.org/2060543002
2016-06-10 13:21:07 -07:00
bsalomon
687d9d2ecc Extend inverse_paths GM to test dashing
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2057213002

Review-Url: https://codereview.chromium.org/2057213002
2016-06-10 12:09:59 -07:00
reed
6644d9353f respect srgb gamma when building mips
Proposed policy:
- If the target is *legacy* (e.g. L32/PMColor) ignore gamma
- If the target is S32/F16 respect gamma

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2029373004

Review-Url: https://codereview.chromium.org/2029373004
2016-06-10 11:41:47 -07:00