Commit Graph

13243 Commits

Author SHA1 Message Date
reed
ad7604b4a7 Have MakeFromImage fission the SkImage into a raster or a texture (patchset #1 id:1 of https://codereview.chromium.org/2167813002/ )"
This reverts commit 3fb87201a1.

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

TBR=robertphilips@google.com

Review-Url: https://codereview.chromium.org/2164073004
2016-07-20 16:13:32 -07:00
reed
3fb87201a1 Revert of have MakeFromImage fission the SkImage into a raster or a texture (patchset #1 id:1 of https://codereview.chromium.org/2167813002/ )
Reason for revert:
broke ios build in chrome -- no_gpu?

Original issue's description:
> have MakeFromImage fission the SkImage into a raster or a texture
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167813002
>
> Committed: https://skia.googlesource.com/skia/+/a61bfc6292edb990eae0b948648016550ef739a9

TBR=robertphillips@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/2168643003
2016-07-20 15:38:15 -07:00
msarett
959ccc1f3f Refactor parsing and storage of SkGammas
Benefits:
(1) Parses and stores gamma tags in a single allocation.
(2) Recognizes equal gamma tags to skip parsing work and
    save memory.

Non-Benefits:
(1) Not less complicated.

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

Committed: https://skia.googlesource.com/skia/+/2ea944c2b710caf29d4795ac953bad14224796f7
Review-Url: https://codereview.chromium.org/2117773002
2016-07-20 15:10:02 -07:00
reed
a61bfc6292 have MakeFromImage fission the SkImage into a raster or a texture
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167813002

Review-Url: https://codereview.chromium.org/2167813002
2016-07-20 14:22:37 -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
caryclark
7d46f4af7d exclude unused functions when mac uses freetype (for pdf)
R=bungeman@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163833004

Review-Url: https://codereview.chromium.org/2163833004
2016-07-20 13:15:51 -07:00
msarett
2aec3ffe32 Revert of Refactor parsing and storage of SkGammas (patchset #7 id:220001 of https://codereview.chromium.org/2117773002/ )
Reason for revert:
Broken bots.

Original issue's description:
> Refactor parsing and storage of SkGammas
>
> Benefits:
> (1) Parses and stores gamma tags in a single allocation.
> (2) Recognizes equal gamma tags to skip parsing work and
>     save memory.
>
> Non-Benefits:
> (1) Not less complicated.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2117773002
>
> Committed: https://skia.googlesource.com/skia/+/2ea944c2b710caf29d4795ac953bad14224796f7

TBR=reed@google.com,brianosman@google.com,mtklein@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/2159253005
2016-07-20 12:58:52 -07:00
reed
cf5c846b41 remove dead methods now that we use specials exclusively for imagefilters
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164763003

Review-Url: https://codereview.chromium.org/2164763003
2016-07-20 12:28:40 -07:00
jvanverth
e499adf328 Use dFdx in Vulkan to address distance field issues.
On Nexus Player and occasionally Nexus 5x we get transparent boxes around
paths. This appears to be because the dFdy call is not as accurate as
dFdx, which is the opposite of Mali 400. As Mali 400 is not supported with
Vulkan, we can go back to using dFdx in this case.

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

Review-Url: https://codereview.chromium.org/2163213004
2016-07-20 12:22:14 -07:00
mtklein
566ea9b9fc Tune linear->sRGB constants to round-trip all bytes.
I basically just ran a big 5-deep for-loop over the five constants here.
This is the first set of coefficients I found that round trips all bytes.
I suspect there are many such sets.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2162063003
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2162063003
2016-07-20 12:10:11 -07:00
msarett
2ea944c2b7 Refactor parsing and storage of SkGammas
Benefits:
(1) Parses and stores gamma tags in a single allocation.
(2) Recognizes equal gamma tags to skip parsing work and
    save memory.

Non-Benefits:
(1) Not less complicated.

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

Review-Url: https://codereview.chromium.org/2117773002
2016-07-20 11:44:42 -07:00
reed
de996a0df7 re-disable save/restore peephole optimization
BUG=skia:5548, 629408
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163283002

Review-Url: https://codereview.chromium.org/2163283002
2016-07-20 11:24:52 -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
reed
158fabb071 re-chop if we fail on a big-bad-cubic
BUG=629455
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2159223005

Review-Url: https://codereview.chromium.org/2159223005
2016-07-20 10:06:59 -07:00
bungeman
1f790aaeef Improve assert reporting.
Make SkASSERTF output readable.
Ensure the assert predicate is stringified once.
Make the abort code consistent.

TBR=reed
This doesn't change any public API, most of this should be privatized.

Review-Url: https://codereview.chromium.org/2161103002
2016-07-20 09:49:10 -07:00
robertphillips
ea70c4bb22 Remove SkDevice::accessRenderTarget virtual
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167723002

Review-Url: https://codereview.chromium.org/2167723002
2016-07-20 08:54:31 -07:00
egdaniel
c1be9bc169 Add GrVkRecycledResource subclass
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167453003

Review-Url: https://codereview.chromium.org/2167453003
2016-07-20 08:33:00 -07:00
fmenozzi
35a98c733f Add integer array uniforms to GL and Vulkan
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163173005

Review-Url: https://codereview.chromium.org/2163173005
2016-07-20 08:26:12 -07:00
bsalomon
487f8d385b Consolidate special case shape transformation logic in GrShapeTest.
Enable all tests on all geometry types.

Add conversion of fill+miter-stroke->fill for rect geometries in GrShape.

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

Review-Url: https://codereview.chromium.org/2157013003
2016-07-20 07:15:44 -07:00
reed
a2217ef965 use special-image for imagefilters and save/restore layer
add special virtuals to device, in preparation for using them instead of bitmap for imagefilters

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

patch from issue 2155933002 at patchset 20001 (http://crrev.com/2155933002#ps20001)

use specialimages instead of bitmaps for imagefiltering

Review-Url: https://codereview.chromium.org/2155063002
2016-07-20 06:04:34 -07:00
mtklein
53574b7236 Fix color order for 565,4444, and I8 samplers.
10 GMs fixed on Linux/Win!

Also, don't unpremul I8 colors.  It's inconsistent with the other formats.

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

Review-Url: https://codereview.chromium.org/2166623002
2016-07-20 05:23:31 -07:00
reed
e51c356ae4 pre-land special methods on device
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2161233002

Review-Url: https://codereview.chromium.org/2161233002
2016-07-19 14:33:20 -07:00
brianosman
9ecaa1d9f0 Remove unused MakeFromTextureCopy API
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165803002

Review-Url: https://codereview.chromium.org/2165803002
2016-07-19 14:16:49 -07:00
robertphillips
ecbc15d46c Minor cleanup of GrStencilAndCoverTextContext
Split out of https://codereview.chromium.org/2163483002/ (Use SkFont in GrStencilAndCoverTextContext)

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

Review-Url: https://codereview.chromium.org/2165673002
2016-07-19 14:04:39 -07:00
mtklein
d1bd2082c5 Update rounding/clamping comments on sk_linear_to_srgb().
Rounding is enough.  No need for an explicit clamp if the inputs are in range.

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

Review-Url: https://codereview.chromium.org/2161223002
2016-07-19 13:36:03 -07:00
Ben Wagner
4bcb4c7a25 Make SkOTTable_name.cpp UTF-8.
When editing on Windows this file became iso-8859-1.
2016-07-19 16:10:56 -04:00
mtklein
35f255f0f7 Fix color order on LCD text when using sRGB software backend.
BUG=skia:5182
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2166533002

Review-Url: https://codereview.chromium.org/2166533002
2016-07-19 12:59:35 -07:00
caryclark
1493b9772d fix fuzzer
Previous spans always have a valid next pointer. The final span does not.
Change the test for a valid link to take into consideration whether
the links are chased forwards or backwards.

TBR=reed@google.com
BUG=629454
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2166543002

Review-Url: https://codereview.chromium.org/2166543002
2016-07-19 11:29:15 -07:00
fmenozzi
64e8e5dd0b Clarify GrGradientEffect key enum
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2158323003

Review-Url: https://codereview.chromium.org/2158323003
2016-07-19 10:45:57 -07:00
msarett
6bdbf4412b Improve naive SkColorXform to half floats
This should give us a good baseline to explore using SkRasterPipeline.

A particular colorxform to half float drops from 425us to 282us on my desktop.

Color Xform to Half Float (HP z620)
Original                              425us
Trans16 (not 32)                      355us
Vector Trans16                        378us
Trans16 + Keep Halfs in Vector        335us
Vector Trans16 + Keep Halfs in Vector 282us
Final                                 282us

Color Xform to Half Float (Nexus 5X)
Original                              556us
Final                                 472us

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2159993003
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2159993003
2016-07-19 09:07:55 -07:00
bsalomon
49b264c217 Create DCs rather than textures in GrConfigConversionEffect
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2162953002

Review-Url: https://codereview.chromium.org/2162953002
2016-07-19 08:38:09 -07:00
reed
7f3ff20843 remove unused MakeFromPixmap
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2158913004

TBR=robertphilips@google.com

Review-Url: https://codereview.chromium.org/2158913004
2016-07-19 08:26:09 -07:00
bsalomon
916e02a6d0 Start from DC rather than texture in GrTexutreParamsAdjuster copy code.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2158383002

Review-Url: https://codereview.chromium.org/2158383002
2016-07-19 08:12:30 -07:00
brianosman
c4459f6a33 Fix debugging code for tracing texture creation
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164623002

Review-Url: https://codereview.chromium.org/2164623002
2016-07-19 08:02:21 -07:00
robertphillips
e34f17d236 Make SkFont a bit more useable
Split out of https://codereview.chromium.org/2163483002/ (Use SkFont in GrStencilAndCoverTextContext)

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

Review-Url: https://codereview.chromium.org/2163633002
2016-07-19 07:59:22 -07:00
bsalomon
b117ff194f Convert readSurfacePixels to use a draw context instead of a texture
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165523003

Review-Url: https://codereview.chromium.org/2165523003
2016-07-19 07:24:40 -07:00
bsalomon
23c4f1acbc Fix GrGLInterface::validate() to check for GL_OES_sample_shading on ES contexts
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2156343004

Review-Url: https://codereview.chromium.org/2156343004
2016-07-19 06:21:55 -07:00
fmalita
01c97230f8 Delete the legacy SVG parser
Unused.

R=reed@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154193003
CQ_INCLUDE_TRYBOTS=master.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/2154193003
2016-07-19 06:12:54 -07:00
fmalita
fd75dd4086 Delete SkXMLPullParser
Unused & not being built.

R=reed@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163463002

Review-Url: https://codereview.chromium.org/2163463002
2016-07-19 05:14:41 -07:00
robertphillips
5139e501c5 Rename variables in SkCanvas::internalSaveLayer
This is split out of https://codereview.chromium.org/2145343005/ (Recast draw_filter_into_device as drawDevice) to, hopefully, make it easier to integrate that CL

TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2162883002

Review-Url: https://codereview.chromium.org/2162883002
2016-07-19 05:10:40 -07:00
kolczyk
718aab1e3f Fix the assert and clamping in SkMatrix::get*Scale[s]().
Follow-up after https://codereview.chromium.org/2143133005/.

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

Review-Url: https://codereview.chromium.org/2154123003
2016-07-19 03:49:14 -07:00
msarett
2812f03d54 Fix rewinding bug in SkJpegCodec
Performing a sampled and/or subset decode will create some state
in SkJpegCodec.  If we fail to clean up this state properly,
subsequent decodes may try to reuse (and potentailly overflow)
the leftover memory.

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

Committed: https://skia.googlesource.com/skia/+/4ecb8ab556214c9337f56bc36d50e4d7c655ac7a
Review-Url: https://codereview.chromium.org/2161593003
2016-07-18 15:56:08 -07:00
bungeman
401ae2d2a0 Rotate bitmap strikes with FreeType.
BUG=skia:3490
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2139703002

Committed: https://skia.googlesource.com/skia/+/31e0c1379e6d0ce48196183e295b929af51fa74e
Review-Url: https://codereview.chromium.org/2139703002
2016-07-18 15:46:28 -07:00
msarett
db00a2a9eb Revert of Fix rewinding bug in SkJpegCodec (patchset #1 id:1 of https://codereview.chromium.org/2161593003/ )
Reason for revert:
Breaking Google3 build.  Will reland corrected version.

Original issue's description:
> Fix rewinding bug in SkJpegCodec
>
> Performing a sampled and/or subset decode will create some state
> in SkJpegCodec.  If we fail to clean up this state properly,
> subsequent decodes may try to reuse (and potentailly overflow)
> the leftover memory.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2161593003
>
> Committed: https://skia.googlesource.com/skia/+/4ecb8ab556214c9337f56bc36d50e4d7c655ac7a

TBR=djsollen@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/2155163004
2016-07-18 15:19:48 -07:00
bsalomon
7890b89418 Remove guards in GrGLInterface::validate() for functions that Chromium used to not provide.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2158983002

Review-Url: https://codereview.chromium.org/2158983002
2016-07-18 14:59:05 -07:00
robertphillips
640789d64b Push GrPipelineBuilder down to the drawBatch calls in the TextContext
This is split out of https://codereview.chromium.org/2092893003/ (Retract PipelineBuilder some more)

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

Review-Url: https://codereview.chromium.org/2155983003
2016-07-18 14:56:06 -07:00
fmalita
125845553b [SkXMLParser] Initial text node support
Also disable entity processing.

R=bungeman@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154853002

Review-Url: https://codereview.chromium.org/2154853002
2016-07-18 14:47:30 -07:00
reed
01a2ff8a32 check for culled-out paths inside SkDraw
BUG=629026
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2155213002

Review-Url: https://codereview.chromium.org/2155213002
2016-07-18 13:22:55 -07:00
fmalita
a427cc4d6b Remove SkDOM::build(const char doc[], size_t len)
This flavor is unused, and we have the more general SkStream API.

R=stephana@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154733003

Review-Url: https://codereview.chromium.org/2154733003
2016-07-18 10:56:43 -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