Commit Graph

2795 Commits

Author SHA1 Message Date
Robert Phillips
e98234f231 Start making texture coordinates be absolute
The idea here is that we will pass GrTextureProxys in (where we're currently passing GrTextures) and defer the normalization until the texture is actually instantiated (and possibly move it to the GPU entirely)

This CL does (intentionally) change the texturedomaineffect GM but I believe the new behavior is more correct.

Change-Id: I4e0510b3dfb65ff0d0ee5921f9a6f94151e602d3
Reviewed-on: https://skia-review.googlesource.com/6807
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-10 16:15:02 +00:00
Brian Salomon
89cb821e9e Separate SkArithmeticImageFilter from SkXfermodeImageFilter.
Change-Id: I145eed7276456b546ca5c66bc1a0f0f74a84f138
Reviewed-on: https://skia-review.googlesource.com/6728
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-09 18:31:29 +00:00
Matt Sarett
e94255d456 Specify bit depth and color space in SkImage::MakeFromPicture()
BUG=skia:

Change-Id: I1d2a2b1f97557fc3e7ca6c2bdad6329f7760dbd2
Reviewed-on: https://skia-review.googlesource.com/6685
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-01-09 18:14:06 +00:00
Brian Salomon
a163392978 Revert "Revert "Removing ref counting from GrXPFactory.""
This reverts commit 003312a211.

Change-Id: Ib41065e5c356d1dd99e70fa10611ac6756c2b79d
Reviewed-on: https://skia-review.googlesource.com/6803
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-09 17:21:03 +00:00
Brian Salomon
003312a211 Revert "Removing ref counting from GrXPFactory."
This reverts commit a8f80de2bc.

Reason for revert: nanobench failing on windows bots, possibly others

Change-Id: Iacb8c650064a28654c165665be057377ffb02ba5
Reviewed-on: https://skia-review.googlesource.com/6802
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-09 16:08:13 +00:00
Brian Salomon
a8f80de2bc Removing ref counting from GrXPFactory.
All GrXPFactory instances are static constexpr.

Change-Id: If1086b08534166201e53b3fd9379104e361eb5e6
Reviewed-on: https://skia-review.googlesource.com/6701
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-09 15:44:53 +00:00
Cary Clark
d4631986e6 ignore max curvature at end point
When a stroked cubic folds back on itself, the
stroker draws a round join.
If the max curvature is at
the endpoint, skip the join.

R=reed@google.com
BUG=skia:6083

Change-Id: I45e429432fcec311fa1115058515639370fe9a16
Reviewed-on: https://skia-review.googlesource.com/6606
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-01-05 18:44:25 +00:00
Brian Salomon
8c852be264 Removing tracking of whether GP/FP coverage calculations are used by XP.
Remove readsCoverage from GrPipelineOptimizations

Remove kNone from GrDefaultGeoProc::Coverage

Remove kIgnoreCoverage from GrXferProcessor::OptFlags

Remove GrPipeline::fIgnoresCoverage

Change-Id: I8f0c9337ee98b9c77af1e9a8a184519ce63822d4
Reviewed-on: https://skia-review.googlesource.com/6552
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-01-04 16:37:18 +00:00
Ben Wagner
3546ff10c2 Stage SkFontMgr factories to return smart pointers.
All the SkFontMgr factories currently return bare pointers and sometimes
even document the ownership rules. Since such factories can be
implemented by external ports, the ownership rules should be explicit in
order to prevent simple reference counting issues.

Change-Id: I25b598ce0954cd473a3fb1f8adc0cb86331583ca
Reviewed-on: https://skia-review.googlesource.com/6533
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-01-04 14:51:09 +00:00
Stephen White
2f4686fa25 Quality and performance fixes for AA tessellating path renderer.
Use quads rather than triangles for the edge geometry. This allows
us to perform a simpler edge categorization (see below). It also
improves performance by reducing the number of edges processed during
the simplify and tessellate steps.

Label AA edges as three types: inner, outer, and connector. This
results in correct alpha values for intersected edges, even when
the top or bottom vertex has been merged with a vertex on edges
of different types.

Changed the "collinear edges" sample from the concavepaths GM for a
"fast-foward" shape, which more clearly shows the problem being fixed
here. (The collinearity from the "collinear edges" was actually being
removed earlier up the stack, causing the path to become convex and
not exercise the concave path renderers anyway.)

NOTE: this will cause changes in the "concavepaths" GM results, and
minor pixel diffs in a number of other tests.

Change-Id: I6c2b0cdb35cda42b01cf1100621271fef5be35b0
Reviewed-on: https://skia-review.googlesource.com/6430
Reviewed-by: Stephan White <senorblanco@chromium.org>
Commit-Queue: Stephan White <senorblanco@chromium.org>
2017-01-03 22:01:19 +00:00
Stephan White
021f927e4c Revert "Quality and performance fixes for AA tessellating path renderer."
This reverts commit d4b2155248.

Reason for revert: accidentally added some unwanted changes

Original change's description:
> Quality and performance fixes for AA tessellating path renderer.
> 
> Use quads rather than triangles for the edge geometry. This allows
> us to perform a simpler edge categorization (see below). It also
> improves performance by reducing the number of edges processed during
> the simplify and tessellate steps.
> 
> Label AA edges as three types: inner, outer, and connector. This
> results in correct alpha values for intersected edges, even when
> the top or bottom vertex has been merged with a vertex on edges
> of different types.
> 
> Changed the "collinear edges" sample from the concavepaths GM for a
> "fast-foward" shape, which more clearly shows the problem being fixed
> here. (The collinearity from the "collinear edges" was actually being
> removed earlier up the stack, causing the path to become convex and
> not exercise the concave path renderers anyway.)
> 
> NOTE: this will cause changes in the "concavepaths" GM results, and
> minor pixel diffs in a number of other tests.
> 
> BUG=660893
> 
> Change-Id: Ide49374d6d173404c7223f7316dd439df1435787
> Reviewed-on: https://skia-review.googlesource.com/6427
> Commit-Queue: Stephan White <senorblanco@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=bsalomon@google.com,senorblanco@chromium.org,reviews@skia.org
BUG=660893
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I06a36e397645bfc42442a5a9e7c27328f6048ab9
Reviewed-on: https://skia-review.googlesource.com/6428
Commit-Queue: Stephan White <senorblanco@chromium.org>
Reviewed-by: Stephan White <senorblanco@chromium.org>
2017-01-03 21:06:30 +00:00
Stephen White
d4b2155248 Quality and performance fixes for AA tessellating path renderer.
Use quads rather than triangles for the edge geometry. This allows
us to perform a simpler edge categorization (see below). It also
improves performance by reducing the number of edges processed during
the simplify and tessellate steps.

Label AA edges as three types: inner, outer, and connector. This
results in correct alpha values for intersected edges, even when
the top or bottom vertex has been merged with a vertex on edges
of different types.

Changed the "collinear edges" sample from the concavepaths GM for a
"fast-foward" shape, which more clearly shows the problem being fixed
here. (The collinearity from the "collinear edges" was actually being
removed earlier up the stack, causing the path to become convex and
not exercise the concave path renderers anyway.)

NOTE: this will cause changes in the "concavepaths" GM results, and
minor pixel diffs in a number of other tests.

BUG=660893

Change-Id: Ide49374d6d173404c7223f7316dd439df1435787
Reviewed-on: https://skia-review.googlesource.com/6427
Commit-Queue: Stephan White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-03 21:01:58 +00:00
Hal Canary
55325b7c59 clean up non-ASCII comments
Change-Id: I07ad00133f6a938de70a94024a0ebe36c6c542bb
Reviewed-on: https://skia-review.googlesource.com/6524
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2017-01-03 16:29:37 +00:00
Brian Salomon
f833478191 Remove ref counting from GrOp.
Instead use std::unique_ptr to manage GrOp lifetime.

Change-Id: Ic1dc1e0ffd7254c3994221f498677af5bbf66a71
Reviewed-on: https://skia-review.googlesource.com/6479
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-01-03 15:22:16 +00:00
Brian Osman
5f500920e7 Change GaussianBlur logic wrt color spaces
I was using 'source' where I should have said 'input'. Also, to be
consistent with other image filters, ensure that the input is in the
destination gamut before we start blurring.

BUG=skia:

Change-Id: I751961b42a2a5d110ee8ea8916279c8fe0d5248e
Reviewed-on: https://skia-review.googlesource.com/6486
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-01-03 14:35:06 +00:00
Mike Reed
85ff84821d remove unused ForceUnique option from makeImageSnapshot
BUG=skia:

Change-Id: I2555ceb86b597f7bb34c8fc48b3e07eb7115ea82
Reviewed-on: https://skia-review.googlesource.com/6481
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-12-29 16:01:42 +00:00
Brian Osman
878df6dd03 Modify matrix convolution GM for sRGB testing
Tag bitmap as sRGB, and adjust gain/bias in color-managed configs to
produce results that are less blown out.

Also added a colorized version of the GM, to validate that gamut
conversion is working.

BUG=skia:

Change-Id: I333988dcdaa1272121e8aa731b4188c942fe19d8
Reviewed-on: https://skia-review.googlesource.com/6466
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-27 17:38:53 +00:00
Matt Sarett
578f52c6cf Fix iOS build
BUG=skia:

Change-Id: I914cd75c84bbe57401ab65352d4e8b3dc413dce1
Reviewed-on: https://skia-review.googlesource.com/6418
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-12-22 18:43:56 +00:00
Matt Sarett
909d3791f5 Improve color space support in SkImage::readPixels()
Correct handling of kGray, k565, k4444 etc. is still a TODO.
SkImage_Generator and SkImage_Gpu are still TODOs.

BUG=skia:6021

Change-Id: Ib53d97d3a866b2b4934fd85c10100855743a8fab
Reviewed-on: https://skia-review.googlesource.com/6396
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-12-22 17:47:08 +00:00
Leon Scroggins III
9be9a42c92 Do not support index8 for generateScaledPixels
Since the in/out parameter is a const SkPixmap without the proper
color table, there is no way to tell the client about it without
modifying the const SkPixmap. Rather than cheating, just return
false.

Change-Id: I63fdf57febc59e1ee9af13aa6eb9b253d19bcb17
Reviewed-on: https://skia-review.googlesource.com/6414
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2016-12-22 15:30:50 +00:00
Leon Scroggins III
20a7ecc49b Implement scaling in SkCodecImageGenerator
Plumb calls down to SkCodec.

Add a gm

Change-Id: I16da24eb739295ab72f487df02f19968151443f3
Reviewed-on: https://skia-review.googlesource.com/6287
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2016-12-21 19:12:51 +00:00
Mike Reed
463c848f3b helper to convert CGImage -> SkImage
BUG=skia:

Change-Id: I07e0b8fe510d34ab541de7572cb6775478527624
Reviewed-on: https://skia-review.googlesource.com/6386
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-12-21 17:38:18 +00:00
Brian Salomon
09d994ecb3 Misc batch->op cleanup Part 1 of 2
Change-Id: I80f951976558a284e55386e0a368f08bd835d8ca
Reviewed-on: https://skia-review.googlesource.com/6359
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-21 16:45:40 +00:00
Robert Phillips
253b4dd51f Handle failed surface creation in AlphaThresholdImageFilter GM
Change-Id: Ibc27d26a9afc1f88d5ca7de2216e09afa10ce846
Reviewed-on: https://skia-review.googlesource.com/6354
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-21 02:06:15 +00:00
Brian Osman
b44bb31137 Add color space xform to GrMagnifierEffect
Tag helper image as sRGB in magnifier image filter GM, so we can see
this working.

BUG=skia:

Change-Id: I8057dc332d09e1d508ad8462aaf0749b307f480f
Reviewed-on: https://skia-review.googlesource.com/6347
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-20 21:34:12 +00:00
Robert Phillips
22c57abe43 Fix mapping from src to dst image space in SkAlphaThresholdFilter
This CL does 3 things:
   It updates the imagealphathreshold GMs so they would've caught this bug
   It updates SkAlphaImageThresholdFilter to fix the bug
   It updates the imagealphathreshold_surface GM to match the imagealphathreshold_crop GM (which it was, presumably, originally written to do)

The bug in question is that the prior mapping from src to dst space was correct as long as the imageOffset was (0, 0).

BUG=675332

Change-Id: I3aa1f463a2234576fb2277797caa2fc4aba2650d
Reviewed-on: https://skia-review.googlesource.com/6291
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Stephan White <senorblanco@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-20 17:40:39 +00:00
Jim Van Verth
6750e91544 Fix precision errors in large circle rendering.
BUG=skia:6044

Change-Id: I2ff2a80e1e6798ad18d1c8ec97e8b0fcc731e9af
Reviewed-on: https://skia-review.googlesource.com/6281
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2016-12-19 20:37:56 +00:00
Robert Phillips
98624d249d "Fix" some ImageFilter fuzzer issues
SkClipOp.h & SkPictureFlat.h
   Invalid SkClipOps were getting through - the question here is where (for a class enum) is a good place to put the k*Mask definition.

SkPath1DPathEffect
   NaNs were getting past.

SkBlurMaskFilter
   Assert wasn't necessary since we whacked the flag on the next line.

Change-Id: I87f95ad39f4760284f881d7c4500eb82fcdba282
Reviewed-on: https://skia-review.googlesource.com/6194
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2016-12-19 17:14:10 +00:00
Brian Osman
138ea97c1a Add color space to picture image as a creation parameter
This gives a picture image a preferred "native" color space, which
facilitates caching and other things.

BUG=skia:

Change-Id: I95988c14d17f96d7d870b3d1c3b723c36e2c170d
Reviewed-on: https://skia-review.googlesource.com/6158
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-16 18:09:02 +00:00
Robert Phillips
8ced688a3a Add GM for filtering bug
For SkFilterQuality we get:

High   - repros for GPU
Medium - repros for both!
Low    - repros for both!
None   - doesn't repro

For AA quality (with filter quality fixed at High) we get:

AA     - repros for GPU
BW     - repros for GPU

BUG=673261

Change-Id: Ibf0644352bfa9d9c0e2d166e396ce9e9799b6d9d
Reviewed-on: https://skia-review.googlesource.com/6187
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-12-16 17:29:48 +00:00
Brian Salomon
895274391d move src/gpu/batches -> src/gpu/ops
Change-Id: I6410eae41f051ce38bef6f38d670924c3483c325
Reviewed-on: https://skia-review.googlesource.com/6163
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-16 16:58:24 +00:00
Brian Salomon
6b316e9e20 Rename GrTestBatch and subclasses to Op
Change-Id: Ideab66b7ca227057a767be48aba3ea69a0a19115
Reviewed-on: https://skia-review.googlesource.com/6161
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-16 16:13:59 +00:00
Brian Osman
d85dd53e28 Shrink the SkImageGenerator API
generateBitmap was used in one test, so it's easily converted to
tryGenerateBitmap. Then, all calls to tryGenerateBitmap supplied
an image info, so we don't need it to be optional.

BUG=skia:

Change-Id: I19e8f9da7e442a2d37af68b029b5ec85228766f7
Reviewed-on: https://skia-review.googlesource.com/6149
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-15 20:47:26 +00:00
Robert Phillips
e2f7d1899d Add a deferred copy surface (take 3)
This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).

There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.

This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface)

Change-Id: Ib8fd96d0569274ef781366eb900ed8ee839ae9bd
Reviewed-on: https://skia-review.googlesource.com/6109
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-15 15:07:39 +00:00
Brian Osman
222e9ad98b Make picture backed images sRGB by default
This adds support for playing back a picture image in a different
color space. This is currently limited to just the original space
(sRGB) or legacy mode. I think the best next step is to make them
fully flexible (playing back in the destination surface's space),
but that's going to involve changes to caching logic. I'd like to
keep that separate.

BUG=skia:

Change-Id: I15e6d44e977328b06a4da008ff7b2ed88d851a0b
Reviewed-on: https://skia-review.googlesource.com/5777
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-12-14 21:14:52 +00:00
Brian Salomon
6a639040bc Update rect ops to use "op" in their name and return sk_sp.
Change-Id: I757c33d1cd17a7a7dda858f0fc5ab1094e3c2472
Reviewed-on: https://skia-review.googlesource.com/5985
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-14 19:27:40 +00:00
Robert Phillips
d316e77c1e Revert "Add a deferred copy surface (take 2)"
This reverts commit 398487a850.

Reason for revert: See if this is causing the roll failure

Original change's description:
> Add a deferred copy surface (take 2)
> 
> This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).
> 
> There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.
> 
> This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface)
> 
> Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4
> Reviewed-on: https://skia-review.googlesource.com/5939
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1ef40f0d5fb0bca62031f94f10eb18acd753e913
Reviewed-on: https://skia-review.googlesource.com/6024
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-12-14 12:05:06 +00:00
Jim Van Verth
ecdb686a5c Fix SDF generation for pixel-aligned paths (take two)
BUG=668550

Change-Id: Ic771818bd5a4a46b83fdb82b69b98cb6b93a23a2
Reviewed-on: https://skia-review.googlesource.com/5697
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-12-14 00:12:24 +00:00
Robert Phillips
398487a850 Add a deferred copy surface (take 2)
This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).

There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.

This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface)

Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4
Reviewed-on: https://skia-review.googlesource.com/5939
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-13 22:01:58 +00:00
Robert Phillips
293d696fcf Revert "Add a deferred copy surface"
This reverts commit 4431de6af9.

Reason for revert: ANGLE errors (at the very least)

Original change's description:
> Add a deferred copy surface
> 
> This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).
> 
> There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.
> 
> Change-Id: Iab1867668d8146a766201158a251b9174438ee2b
> Reviewed-on: https://skia-review.googlesource.com/5773
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I61408d9e306b9b1ab32f93ab086e95184e12857f
Reviewed-on: https://skia-review.googlesource.com/5938
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-12-13 18:48:20 +00:00
Robert Phillips
4431de6af9 Add a deferred copy surface
This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).

There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.

Change-Id: Iab1867668d8146a766201158a251b9174438ee2b
Reviewed-on: https://skia-review.googlesource.com/5773
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-13 17:57:13 +00:00
Stan Iliev
5f1bb0a7c5 Add a method in SkCanvas to set "hard" clip bounds.
Add SkCanvas::setBoundRect, which sets the max clip rectangle,
which can be replaced by clipRect, clipRRect and clipPath.

BUG=skia:

Change-Id: Ie39eb1715214971576e7a1dda760c6997a7e0208
Reviewed-on: https://skia-review.googlesource.com/5359
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2016-12-12 23:24:31 +00:00
Yuqian Li
131c1fb963 Add GMs and benchs for concave Analytic AA
BUG=skia:

Change-Id: I2ed6e2c4f81dc9d5c53b07332c0063f42c6b3c79
Reviewed-on: https://skia-review.googlesource.com/5771
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2016-12-12 22:08:38 +00:00
Mike Reed
ebfce6d9b4 change SkClipOp to a class enum
BUG=skia:

Change-Id: I25dbe6d6b8666a2a0a7be7bdd2ae0b067868d14e
Reviewed-on: https://skia-review.googlesource.com/5718
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-12-12 15:38:31 +00:00
Brian Osman
c87f99ef06 Make subset param to texture generation API non-optional
We were always already supplying this, makes it simpler

BUG=skia:

Change-Id: I36ac35205df5ab2a0fb7ec26e83ddb1547154816
Reviewed-on: https://skia-review.googlesource.com/5778
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-12 15:15:15 +00:00
Brian Salomon
1951f3ddbd Rename testingOnly_drawBatch to testingOnly_addDrawOp and sk_sp
Change-Id: I35efd4ad2b7132145c1e477f0b1f283276e9fad5
Reviewed-on: https://skia-review.googlesource.com/5704
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-09 22:28:31 +00:00
Brian Salomon
0e8fc8b9e6 Relandx2 "Remove antialiasing control from GrPaint."
Fixes a bad merge.

This reverts commit 073285c059.

Change-Id: I5e92339d9b33d3a6dc58b9fcd2a1b3a5684e8f8a
Reviewed-on: https://skia-review.googlesource.com/5774
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-09 20:43:41 +00:00
Brian Osman
61624f0c71 Plumb dst color space in many places, rather than "mode"
This is less to type in most cases, and gives us more information
(for things like picture-backed images, where we need to know all
about the destination surface).

Additionally, strip out the plumbing entirely for bitmap sources,
where we don't need to know anything.

BUG=skia:

Change-Id: I4deff6c7c345fcf62eb08b2aff0560adae4313da
Reviewed-on: https://skia-review.googlesource.com/5748
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-09 20:31:23 +00:00
Brian Salomon
073285c059 Revert "Reland "Remove antialiasing control from GrPaint.""
This reverts commit 3944484020.

Reason for revert: Merges badly with a recent change. Will rebase and reland.

Original change's description:
> Reland "Remove antialiasing control from GrPaint."
> 
> This contains fixes for GLPrograms test and mixed samples rendering.
> 
> This reverts commit 419d81eed4.
> 
> BUG=skia:
> 
> Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87
> Reviewed-on: https://skia-review.googlesource.com/5763
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Iff9657041e28604a845bc5a9acec7c9b248c53bd
Reviewed-on: https://skia-review.googlesource.com/5772
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-12-09 20:02:22 +00:00
Brian Salomon
3944484020 Reland "Remove antialiasing control from GrPaint."
This contains fixes for GLPrograms test and mixed samples rendering.

This reverts commit 419d81eed4.

BUG=skia:

Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87
Reviewed-on: https://skia-review.googlesource.com/5763
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-12-09 19:56:24 +00:00