Commit Graph

5604 Commits

Author SHA1 Message Date
Brian Osman
8a83ca4e9a Add "sharpen" option to SkSL, to LOD bias all textures
This adds a fixed bias (-0.5) to the computed LOD of all
mip-mapped texture fetches. (Technically, to all texture
fetches, but that only matters for mip-mapped ones).

Clients can opt-in with a new GrContextOption.

Bug: skia:7541
Bug: chromium:562162
Change-Id: Ie3cd0679c4ab66f62d2dc32e7e68e5c99355115e
Reviewed-on: https://skia-review.googlesource.com/106322
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-02-13 16:30:20 +00:00
Robert Phillips
d76e56d93c Add SkCharacterization creation helper to GrContextThreadSafeProxy
Change-Id: I8ad7cf335f2b586cf501eaa70573690fbbd53efa
Reviewed-on: https://skia-review.googlesource.com/106105
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-13 16:03:50 +00:00
Brian Salomon
366093f212 Make it so that GrSurfaceContext with a sRGB GrPixelConfig must have a
color space with a sRGB-like gamma.

Change-Id: I99b80a9846caacd6848b0f9f55ed0f7f23e69b90
Reviewed-on: https://skia-review.googlesource.com/106640
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-02-13 14:48:23 +00:00
Mike Reed
d72d6c5f8a underflow makes it hard to compute proper radii
Bug: skia:6209
Change-Id: I7c13d58db36c959f6add0638b72fa068ce0c2266
Reviewed-on: https://skia-review.googlesource.com/106740
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-12 21:45:53 +00:00
Greg Daniel
3081508215 Remove unused code resulted from deleting DeferredTextureImage
Bug: skia:
Change-Id: Iaedc09880bd6a2d8fda4ce52f1644a944dd72605
Reviewed-on: https://skia-review.googlesource.com/106266
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-02-10 01:22:11 +00:00
Mike Reed
7fcfb62199 move a bunch of helpers from SkImageInfo.h into priv
Bug: skia:
Change-Id: I8c91cfdb89e4f22448d1201d391556fe43d86dca
Reviewed-on: https://skia-review.googlesource.com/105289
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-02-09 20:38:32 +00:00
Brian Salomon
67f8584b6f Revert "Revert "Remove SkImage deferred texture image data APIs.""
This reverts commit aae533e418.

Change-Id: I0434892d8946490a75e17620c49c594eaa18158e
Reviewed-on: https://skia-review.googlesource.com/100603
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-09 14:19:51 +00:00
Greg Daniel
457469c7a0 Make non-ddl lazy proxys clean-up and delete their callbacks immediately after instanstation.
This makes sure resources are released and free'd as soon as possible if we
no longer need them.

Bug: skia:
Change-Id: Ic216987649c54183f8cbbff90a633860a97754b3
Reviewed-on: https://skia-review.googlesource.com/105721
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-02-08 20:33:40 +00:00
Mike Reed
4c790bd7dd add writePixels to SkSurface --> so we can remove it from canvas
Bug: skia:
Change-Id: Ib35d7bdc113c3fd9f6dfacb42ec61aaa448cb165
Reviewed-on: https://skia-review.googlesource.com/105623
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-02-08 19:34:50 +00:00
Mike Reed
d4746984e5 ensure that what is valid for a surface is also valid for an image
Note, this change will cause some previously succeeding surfaces to fail to build (since they could not snap their image)

Bug: skia:7598
Change-Id: I012ca752ba1351a904625d216429eab646ca4a85
Reviewed-on: https://skia-review.googlesource.com/105421
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-08 16:50:59 +00:00
Greg Daniel
76546506d1 Remove unused SkpSkGrTest.cpp
Doesn't look like this is used or even built anymore. If we ever find a
future use for it we can add it back.

Bug: skia:
Change-Id: I736df90d984756b2dd14d95e8e5b4f3ec72ce8f7
Reviewed-on: https://skia-review.googlesource.com/105602
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-02-08 15:05:44 +00:00
Robert Phillips
0b33cc42b4 Remove nvprdit* configs
Having removed the NVPR text renderer, the nvprdit* configs are no longer interesting/useful.

Change-Id: Ic4b9d6507d3e3595723a27636cb58b5e811fb3a3
Reviewed-on: https://skia-review.googlesource.com/105563
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-08 13:57:09 +00:00
Cary Clark
4f5a79c676 remove kRW_LegacyBitmapMode
experiment to see if there are any unknown dependencies
on kRW_LegacyBitmapMode

R=reed@google.com,fmalita@chromium.org,bungeman@google.com
Bug: skia:5615
Change-Id: I2cc578570ac18cd31c3520e1bd801f4a7a669347
Reviewed-on: https://skia-review.googlesource.com/105283
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-02-08 13:34:49 +00:00
Robert Phillips
4150eea6c4 Move control of explicit GPU resource allocation to GrContextOptions
Change-Id: Ic284acc79bab5936f0007d5ae5fb1e7a9929e2af
Reviewed-on: https://skia-review.googlesource.com/104880
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-08 12:36:29 +00:00
Chris Dalton
6f8fa4e6ca Implement Sk2f::Store4
Bug: skia:
Change-Id: I2adb983d68625d327e7c00e53b6ae4703b46252f
Reviewed-on: https://skia-review.googlesource.com/104761
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-02-07 05:06:15 +00:00
Mike Klein
9ca602ae04 guard xml-using tests with SK_XML
I think this will fix the Google3 roll.

Unclear to me if we actually want this to work there.
I guess it comes down to the expat dependency?

Change-Id: I5f8a6263aeae29e338a13207845fbe51ac9acc18
Reviewed-on: https://skia-review.googlesource.com/104562
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-02-07 00:33:45 +00:00
Bryce Thomas
fd5a5081d5 Add link annotation support to SkSVGDevice.
This CL implements |SkSVGDevice::drawAnnotation|, overridden from
|SKBaseDevice|.  |drawAnnotation| supports annotating rectangular areas
of a Skia device.  Previous to this change, annotations are being used
in |SkPDFDevice| to include hyperlinked rectangular areas in .pdf
documents.  This CL implements the SVG equivalent of this PDF feature.

BUG=skia:7581

Docs-Preview: https://skia.org/?cl=104680
Change-Id: I92ae01ceb7ae10cd2010bebab2a58dcfe48ef253
Reviewed-on: https://skia-review.googlesource.com/104680
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-02-06 23:35:16 +00:00
Mike Reed
5dd202dc90 Revert "Revert "move GrColor.h to private, IWYU""
This reverts commit 63cc29304a.

Reason for revert: pdfium updated

Original change's description:
> Revert "move GrColor.h to private, IWYU"
> 
> This reverts commit e602f39581.
> 
> Reason for revert: Breaks PDFIUM
> 
> Original change's description:
> > move GrColor.h to private, IWYU
> > 
> > Bug: skia:
> > Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e
> > Reviewed-on: https://skia-review.googlesource.com/104160
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,reed@google.com
> 
> Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/104440
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,reed@google.com

Change-Id: I22fa5c0e0628b5c1f3b5f13879c7d1a4528cc93a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/104561
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-06 23:05:46 +00:00
Brian Salomon
63cc29304a Revert "move GrColor.h to private, IWYU"
This reverts commit e602f39581.

Reason for revert: Breaks PDFIUM

Original change's description:
> move GrColor.h to private, IWYU
> 
> Bug: skia:
> Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e
> Reviewed-on: https://skia-review.googlesource.com/104160
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,reed@google.com

Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/104440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-06 18:33:26 +00:00
Mike Reed
e602f39581 move GrColor.h to private, IWYU
Bug: skia:
Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e
Reviewed-on: https://skia-review.googlesource.com/104160
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-02-06 15:42:15 +00:00
Brian Salomon
5711133a1b Remove integer texture support
Change-Id: I0db1c4d705711b8d980bbe0d986013daec6c8ef3
Reviewed-on: https://skia-review.googlesource.com/103762
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-02-06 12:56:46 +00:00
Brian Salomon
9708af826c Add test for reading back from unpremul texture image
The unpremul->unpremul readback doesn't work today. GrSurfaceContext doesn't track an alpha type and whenever we read into an unpremul buffer we unpremul the texture's colors since we assume they were premuled.

Bug: 7580

Change-Id: I307a168799f27b2015e082cf6adde26b906cfe2b
Reviewed-on: https://skia-review.googlesource.com/103780
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-05 18:31:06 +00:00
Greg Daniel
3f9797d2a5 Remove SK_DISABLE_DEFERRED_PROXIES define through code
Bug: skia:
Change-Id: I03503dfee145f1cebf4ff73d5e5139ef17b42d85
Reviewed-on: https://skia-review.googlesource.com/103464
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-02-05 16:18:26 +00:00
Robert Phillips
d587ebe9ea Remove assert from SkStroke.cpp
If we can't trust the contains tests on the bounding boxes we're already in a bad place.
With this change we'll somewhat arbitrarily get one of the two contours but, hopefully,
given the degeneracy of the geometry it won't matter which one dominates.

BUG=skia:6491
Change-Id: Id6f92f9331dc04a2555267781b07e5218345ef1b
Reviewed-on: https://skia-review.googlesource.com/103460
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-05 14:44:46 +00:00
Robert Phillips
e8fabb2665 Update LazyProxy creation to allow for a non-textureable result
Change-Id: Ic284b4f4220afa714159e07f57798a94fd40d63a
Reviewed-on: https://skia-review.googlesource.com/102484
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-04 20:01:28 +00:00
Brian Salomon
bdecacfbe4 Revert "Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""""
This reverts commit 3a2cc2c2ec.

Fix code with samplecnt=0 that slipped in between trybots/CQ and landing of previous version

Change-Id: Iab19f2e8d1e9901601c8c76244d7a88c5d707fab
Reviewed-on: https://skia-review.googlesource.com/103181
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-03 01:59:59 +00:00
Brian Salomon
3a2cc2c2ec Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""""
This reverts commit 5bb82cbecd.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""
> 
> This reverts commit 18c52a7b52.
> 
> Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types"
> 
> 
> Bug: skia:
> Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947
> Reviewed-on: https://skia-review.googlesource.com/102940
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: Idee23be2f1719f0bdc9305043e95a2d589bee8d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/103220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-03 00:25:20 +00:00
Brian Salomon
5bb82cbecd Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""
This reverts commit 18c52a7b52.

Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types"


Bug: skia:
Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947
Reviewed-on: https://skia-review.googlesource.com/102940
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-02 23:37:59 +00:00
Cary Clark
4efcb7d100 handle degenerate cubic loops
fuzzer generated a cubic with a very tiny loop at one end.
Breaking the cubic in two generated a piece so small it was
discarded, passing the original along.

Instead, use the loop detection as a hint that passing
the original may fail further along. Keep the big piece,
which is more linear than the original;
and change its end to match the original input if the
small piece isn't worth keeping.

R=kjlubick
Bug: skia:7480
Change-Id: If4c5cd46dbf7e16526269f2854e4f2278f427461
Reviewed-on: https://skia-review.googlesource.com/103100
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-02-02 20:39:09 +00:00
Brian Salomon
18c52a7b52 Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""
This reverts commit d0d7270fcc.

Revert "More sample count cleanup:"

This reverts commit d653cac70e.

Revert "Add new GrContext queries for imagability, surfacability, and max sample count of color types"

This reverts commit 85ae7159c9.


Need to understand NVPR perf changes before relanding

Change-Id: I0db075fb42438ef2a1f9885df184dce52892ac4b
Reviewed-on: https://skia-review.googlesource.com/102780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-02 12:19:52 +00:00
Brian Salomon
85ae7159c9 Add new GrContext queries for imagability, surfacability, and max sample count of color types
Bug: skia:7538
Change-Id: I235fc1aa947ba57faa7aef5e7e7ce9241b315fff
Reviewed-on: https://skia-review.googlesource.com/99704
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-02 00:16:28 +00:00
Brian Salomon
d653cac70e More sample count cleanup:
rename getSampleCount -> getRenderTargetSampleCount because it will return
0 when a config is not renderable but *is* supported as a texture format.
(Old name kept around until Chrome stops calling it)

Add virtual GrCaps::maxRenderTargetSampleCount(GrPixelConfig).

Devirtualize isConfigRenderable() and implement as maxRTSC != 0. Separate implementation for version with bool withMSAA param to be removed after Flutter is updated to no longer call.

Consolidate various file static GrSurfaceDesc validators fns into GrCaps::validateSurfaceDesc().


Bug: skia:
Change-Id: Ie30a291aa027e910df3bd90fac8518ccdb39e53f
Reviewed-on: https://skia-review.googlesource.com/102141
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-01 21:56:49 +00:00
Brian Salomon
d0d7270fcc Revert "Revert "Redefine the meaning of sample counts in GPU backend.""
Fixes gpu config default samples to be 1 and updates config parsing test accordingly.

This reverts commit c1ce2f7966.

Bug: skia:
Change-Id: I456973b1f52ced85a2011ea10fc49449bfc5846f
Reviewed-on: https://skia-review.googlesource.com/102147
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-01 21:15:39 +00:00
Robert Phillips
9e441eebf3 Fix SkSurfaceCharacterization unit test for DDL
Change-Id: I0a6ad85b9ff45d332e413f335b65ea644c0af6a1
Reviewed-on: https://skia-review.googlesource.com/102324
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-01 20:45:38 +00:00
Mike Reed
40d8297ca8 detect truncated pict streams
Bug: skia:7565
Change-Id: I203797fb8d4ced8d3fcb13de71feb5f4487c9515
Reviewed-on: https://skia-review.googlesource.com/102661
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-02-01 20:09:58 +00:00
Robert Phillips
7a13705e03 Fix DDL unit tests
Change-Id: I2c3da5f0390b6222a4ffefe8b50a20c3aee98da6
Reviewed-on: https://skia-review.googlesource.com/102620
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-01 19:59:08 +00:00
Brian Salomon
c1ce2f7966 Revert "Redefine the meaning of sample counts in GPU backend."
This reverts commit 48825b11ad.

Reason for revert: nanobench

Original change's description:
> Redefine the meaning of sample counts in GPU backend.
> 
> Old: 0  -> nonMSAA
>      1+ -> MSAA
> 
> New:
>      0  -> error/unsupported
>      1  -> nonMSAA
>      2+ -> MSAA
> 
> We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility:
> 
> 1) SkSurface factories
> 2) GrBackendRenderTarget constructors
> 3) GrCaps::getSampleCnt()'s requestedCount parameter
> 
> However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally.
> 
> This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case.
> 
> 
> Bug: skia:
> Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33
> Reviewed-on: https://skia-review.googlesource.com/101560
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: Ic257619a8a5ee9ac15419ecf10259e42daed7f82
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/102662
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-01 18:34:40 +00:00
Ethan Nicholas
130fb3f7aa updated .fp file headers
Bug: skia:
Change-Id: I9c39622f34e803a706acd04372be569667380661
Reviewed-on: https://skia-review.googlesource.com/102204
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-02-01 18:22:03 +00:00
Brian Salomon
48825b11ad Redefine the meaning of sample counts in GPU backend.
Old: 0  -> nonMSAA
     1+ -> MSAA

New:
     0  -> error/unsupported
     1  -> nonMSAA
     2+ -> MSAA

We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility:

1) SkSurface factories
2) GrBackendRenderTarget constructors
3) GrCaps::getSampleCnt()'s requestedCount parameter

However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally.

This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case.


Bug: skia:
Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33
Reviewed-on: https://skia-review.googlesource.com/101560
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-01 18:16:58 +00:00
Greg Daniel
0a375db9a4 Have lazy proxies keep their callbacks around and clean up their lambdas in the dtor
I believe after this CL we will be at a place where we just have to null out the
fTarget of a lazy proxy and it will reinstantiate itself.

Bug: skia:
Change-Id: I88fdc70e149eba4514a0823da99383583394005c
Reviewed-on: https://skia-review.googlesource.com/102021
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-02-01 17:24:38 +00:00
Greg Daniel
abba998d75 Fix GrBackendTextureImageGenerator to hold context lock till all proxies are gone
This fixes a bug where if we created two proxies for the same context. We would
release the context lock after one of the proxies was released instead of
waiting for all proxies to be released.

Bug: skia:
Change-Id: Ia6ed8148abb029bd1f95c85bc3d3ef003e8de408
Reviewed-on: https://skia-review.googlesource.com/102322
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-02-01 15:33:23 +00:00
Mike Reed
3d5a6b5f25 add saturate helper for float2int64
Bug: skia:
Change-Id: I157f8c047145874c4585ae870018163908389b26
Reviewed-on: https://skia-review.googlesource.com/102321
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-01-31 21:21:36 +00:00
Robert Phillips
d5f9cdd4b3 Add SkSurface_Gpu::MakeWrappedRenderTarget method
This is pulled out of https://skia-review.googlesource.com/c/skia/+/101480 (Implement GPU/OpList DDLs)

Change-Id: I12b1ac346c7c1fa10f2120bc92bee63c93fc2249
Reviewed-on: https://skia-review.googlesource.com/102101
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-31 21:15:45 +00:00
Brian Salomon
57b0430e19 Fix mock tex rt gpu mem size
Change-Id: Ieeab32d3eb8fdbb16c004537f2d50956d6ec74d3
Reviewed-on: https://skia-review.googlesource.com/102022
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-30 21:08:50 +00:00
Hal Canary
ff2742eba8 SkQP: slim deps. Also skia_enable_fontmgr_empty
Change-Id: I24ee2fb3a4a4ca03a60ee2f1a90e022825eee409
Reviewed-on: https://skia-review.googlesource.com/101820
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-01-30 18:57:45 +00:00
Leon Scroggins III
495e0f079c Simplify SkAnimatedImage
Bug: b/63908092

Rather than keeping track of the time and whether the animation is
running, leave that up to the client. Offer a single method to decode
the next frame, allowing the client to stay one frame ahead.

Change-Id: I546013e32e3a0874181b0dce1349bbec07aaadd4
Reviewed-on: https://skia-review.googlesource.com/101544
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-30 18:46:35 +00:00
Mike Reed
1c6e7831e5 handle paths with degenerate verbs
Bug: skia:7507
Change-Id: I13cedcf8a13f4ce4417ae5c19f7f74d2652724d2
Reviewed-on: https://skia-review.googlesource.com/101760
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-30 17:05:25 +00:00
Mike Reed
c4e31092b1 don't draw images with nonfinite dst bounds
Bug: skia:
Change-Id: I95f32f8b9d6c47c3d95c0a19f7fdaaa6a648ef09
Reviewed-on: https://skia-review.googlesource.com/101745
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-30 16:40:25 +00:00
Mike Reed
63227ca63b handle clipping large triangles
originally found by fuzzer.

Bug: skia:
Change-Id: I45007a619f13936153c0db8a60b3631a2c9db20c
Reviewed-on: https://skia-review.googlesource.com/101741
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-30 15:56:35 +00:00
Robert Phillips
7f861927fc Revert "Drop support for unused MSAA extensions"
This reverts commit 7df27465c4.

Reason for revert: experimental revert to see if this is the cause of the tree redness

Original change's description:
> Drop support for unused MSAA extensions
> 
> Bug: skia:
> Change-Id: I113b80e3f991f195155148625ceb29242ea82776
> Reviewed-on: https://skia-review.googlesource.com/101403
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com,ethannicholas@google.com

Change-Id: I4fa4123e2d176bef88cd76a09a14053d9ac5809f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/101680
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-30 13:13:56 +00:00