Commit Graph

6633 Commits

Author SHA1 Message Date
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
Brian Osman
a69f4cf0a7 Remove sk_ref_sp's misleading preprocessor define and comment
This function will always be useful. Don't make it look/feel like a
temporary hack.

BUG=skia:

Change-Id: I6506d7d51dc3b25a7dbcea4ac273f51cf05f3a89
Reviewed-on: https://skia-review.googlesource.com/6330
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-21 15:36:13 +00:00
Brian Salomon
92aee3d685 This renames methods and classes that relate to static analysis of combinations of GrDrawOps and GrPipelines.
Change-Id: I737b901a19d3c67d2ff7f95802fb4df35656beb2
Reviewed-on: https://skia-review.googlesource.com/6199
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-21 15:12:49 +00:00
Robert Phillips
f4e27f68b0 Remove getDevice_just_for_deprecated_compatibility_testing (take 2)
Change-Id: I516ba4ff1c30bb91563a50c6f2b50f6c01c96f5b
Reviewed-on: https://skia-review.googlesource.com/6346
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-20 22:26:57 +00:00
Brian Salomon
42ad83ac19 Rename batch->op in GrAuditTrail.
Change-Id: I68670e5ceb06716e9928ee58485d63e157c7aca7
Reviewed-on: https://skia-review.googlesource.com/6345
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-20 21:50:09 +00:00
Robert Phillips
33667da26d Restore getDevice_just_for_deprecated_compatibility_testing
Change-Id: I98e73a5f72ef8c8efb1a4f382a5359d21bb5edc8
Reviewed-on: https://skia-review.googlesource.com/6325
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-20 16:38:48 +00:00
Robert Phillips
22f4a1fd48 Remove getDevice_just_for_deprecated_compatibility_test()
BUG=skia:6067

Change-Id: I646e75f43bc77ea884b7fad7281bf0b684996bb9
Reviewed-on: https://skia-review.googlesource.com/6299
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-20 14:39:45 +00:00
Mike Reed
3711e1185d switch to _deprecated suffix for exotic SkClipOps
BUG=skia:

Change-Id: Ibb0cd0f963c040d9033cd6bcb040c651bca99651
Reviewed-on: https://skia-review.googlesource.com/6206
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-12-20 13:46:58 +00:00
Matt Sarett
2410717f90 Fix swapped interpretation of c and e in SkColorSpace_ICC
The ICC errata supports the opposite of what we do.
http://www.color.org/icc_specs2.xalter

TBR=reed@google.com

BUG=skia:

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I18ace7f312926b264e624c30d8cb983eff5c434b
Reviewed-on: https://skia-review.googlesource.com/6277
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-19 20:23:03 +00:00
Mike Reed
65869fb64b update dox for generateScaledPixels
BUG=skia:

Change-Id: Ia897c9f58ccb856b92308cdec0abde86fb1b2e29
Reviewed-on: https://skia-review.googlesource.com/6278
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-12-19 19:46: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
Mike Reed
5cbc7b913b simplify generatescaledpixels
BUG=skia:

Change-Id: Ia1f975d8ca088a552258fd70d3333683a88bbb5f
Reviewed-on: https://skia-review.googlesource.com/6234
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-12-19 13:46:52 +00:00
Ravi Mistry
113d05fa7b Revert "Revert "WIP: Skia support library for ICC tasks""
This reverts commit eb733fbf56.

Reason for revert: Revert patch was automatically merged incorrectly?

Original change's description:
> Revert "WIP: Skia support library for ICC tasks"
> 
> This reverts commit fc8dc3194a.
> 
> Reason for revert: Breaks Build-Mac-Clang-Arm7-{Debug,Release}-iOS builds.
> Example tasks:
> * https://chromium-swarm.appspot.com/task?id=3322f668620b9e10&refresh=10
> * https://chromium-swarm.appspot.com/task?id=332296146331e810&refresh=10
> 
> Original change's description:
> > WIP: Skia support library for ICC tasks
> > 
> > As a starting point, this would be mostly trivial to implement using
> > SkColorSpace.
> > 
> > This also would give us the flexibility to begin to move all of
> > the ICC related code from SkColorSpace to SkICC.
> > 
> > What are the advantages of moving this away from SkColorSpace?
> > (1) A long term goal (once Chrome uses SkCodec), might be to
> > move SkColorSpace::MakeICC() out of the public API.  That way,
> > we can guarantee that we can draw to/from *any* SkColorSpace.
> > (2) Keeps SkColorSpace separate from ICC-specific representations
> > like SkColorSpaceTransferFn etc.
> > 
> > BUG=skia:
> > 
> > Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165
> > Reviewed-on: https://skia-review.googlesource.com/5676
> > Commit-Queue: Matt Sarett <msarett@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> > 
> 
> TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org
> BUG=skia:
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: Ibdf272fce25892402bd3e85595fb8814cdf59856
> Reviewed-on: https://skia-review.googlesource.com/6232
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> 

TBR=mtklein@google.com,rmistry@google.com,msarett@google.com,reviews@skia.org,brianosman@google.com,reed@google.com
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I68b1624cfab8adfe31b17e1193a7766507dec8b0
Reviewed-on: https://skia-review.googlesource.com/6233
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2016-12-17 01:31:22 +00:00
Ravi Mistry
eb733fbf56 Revert "WIP: Skia support library for ICC tasks"
This reverts commit fc8dc3194a.

Reason for revert: Breaks Build-Mac-Clang-Arm7-{Debug,Release}-iOS builds.
Example tasks:
* https://chromium-swarm.appspot.com/task?id=3322f668620b9e10&refresh=10
* https://chromium-swarm.appspot.com/task?id=332296146331e810&refresh=10

Original change's description:
> WIP: Skia support library for ICC tasks
> 
> As a starting point, this would be mostly trivial to implement using
> SkColorSpace.
> 
> This also would give us the flexibility to begin to move all of
> the ICC related code from SkColorSpace to SkICC.
> 
> What are the advantages of moving this away from SkColorSpace?
> (1) A long term goal (once Chrome uses SkCodec), might be to
> move SkColorSpace::MakeICC() out of the public API.  That way,
> we can guarantee that we can draw to/from *any* SkColorSpace.
> (2) Keeps SkColorSpace separate from ICC-specific representations
> like SkColorSpaceTransferFn etc.
> 
> BUG=skia:
> 
> Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165
> Reviewed-on: https://skia-review.googlesource.com/5676
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ibdf272fce25892402bd3e85595fb8814cdf59856
Reviewed-on: https://skia-review.googlesource.com/6232
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2016-12-17 01:27:10 +00:00
Brian Salomon
2ee084e730 Rename GrBatchAtlas -> GrDrawOpAtlas.
Change-Id: I776f37e42dcab8b16535c48df9c405b1f211f6c9
Reviewed-on: https://skia-review.googlesource.com/6165
Commit-Queue: Brian Salomon <brian@thesalomons.net>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-17 00:35:39 +00:00
Lee Salzman
ee1c73fc1b tweak SkOnce.h header to work around issues with std::atomic::compare_exchange_strong
BUG=skia:

Change-Id: Id29c47cb4bec6a6d70d6514d18fa4ab9bd31b1e2
Reviewed-on: https://skia-review.googlesource.com/6200
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-16 22:21:27 +00:00
Matt Sarett
fc8dc3194a WIP: Skia support library for ICC tasks
As a starting point, this would be mostly trivial to implement using
SkColorSpace.

This also would give us the flexibility to begin to move all of
the ICC related code from SkColorSpace to SkICC.

What are the advantages of moving this away from SkColorSpace?
(1) A long term goal (once Chrome uses SkCodec), might be to
move SkColorSpace::MakeICC() out of the public API.  That way,
we can guarantee that we can draw to/from *any* SkColorSpace.
(2) Keeps SkColorSpace separate from ICC-specific representations
like SkColorSpaceTransferFn etc.

BUG=skia:

Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165
Reviewed-on: https://skia-review.googlesource.com/5676
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-12-16 22:13:28 +00:00
Brian Salomon
f856fd1ccd Rename GrBatchFontCache->GrAtlasGlyphCache
Change-Id: Ie21e18b631daa24e70df630b9f910213f62bdbdf
Reviewed-on: https://skia-review.googlesource.com/6164
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-16 19:48:35 +00:00
Ben Wagner
884300dca5 Remove SkDynamicMemoryWStream::getOffset.
This method does the same thing as ::bytesWritten but has a confusing
name. It appears there are no external users, so remove it.

Change-Id: I06aed269200c34c2dda36605092f8ea37fcec693
Reviewed-on: https://skia-review.googlesource.com/6188
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-12-16 19:02:53 +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
Mike Reed
9864257182 hide deprecated SkImage::preroll
BUG=skia:

Change-Id: Id7369b0c3b4216f7e040e51c2c80520f20e7168a
Reviewed-on: https://skia-review.googlesource.com/6184
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-12-16 17:11:39 +00:00
Mike Klein
6b00a07d4f simplify SkTHash* move support
Don't know why I thought this had to be so complicated before.

BUG=skia:6053

Change-Id: Ie714fed1cb47e9add166d4227d3d31f95eba2411
Reviewed-on: https://skia-review.googlesource.com/6121
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-15 21:31:26 +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
Mike Reed
9c457ad27b speedup dynamicwstream
- move bytesWritten calculation to query the tail, allowing write() to be faster since it doesn't have to update anything extra per-write.
- enforce that all blocks are multiple-of-4 bytes big
- update the minimum block size to 4K

Before: 30ms
After:  23ms for non-4-bytes writes
        13ms for 4-bytes writes

BUG=skia:

Change-Id: Id06ecad3b9fe426747e02accf1393595e3356ce3
Reviewed-on: https://skia-review.googlesource.com/6087
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-12-15 19:49:31 +00:00
Mike Reed
5adaf8bf24 remove unused dynamicwstream.snapshotAsData()
Checking to invalidate this on every write() call has a measurable cost, so removing it both simplifies the class and speeds it up.

BUG=skia:

Change-Id: Idf0baa265c9a0b5d26d82fce948c61ed9b0810b1
Reviewed-on: https://skia-review.googlesource.com/6096
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-12-15 19:01:02 +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
bungeman
8dc1f62d23 Remove strange 'write' overload on SkDynamicMemoryWStream.
This should have been names 'overwrite' and appears to be unused.

Change-Id: Ic9dd21e6789fb079fcbc209ed5d074a77f3587cc
Reviewed-on: https://skia-review.googlesource.com/6092
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-12-14 22:24:45 +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
Robert Phillips
31c2608e85 Demote savePixels to save_pixels
This CL again only really makes sense in the bigger picture of moving readPixels off of GrTexture

Change-Id: Ib76482d8a773144e8fc7c6e55b2c7fa7b3ea0ecf
Reviewed-on: https://skia-review.googlesource.com/6086
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-14 20:48:32 +00:00
Herb Derby
acef51fdd8 Remove tombstones from SkTHash.
* Switch to linear probing - this allows delete to rearrange elements to fill in empty slots
* NULL -> nullptr


Change-Id: I741c2f3bb2734bf638d0c0a78c6cc549f563a5d9
Reviewed-on: https://skia-review.googlesource.com/5980
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-12-14 20:07:15 +00:00
Mike Reed
2dc523722e remove PLAIN_ENUM flag for SkClipOp
BUG=skia:

Change-Id: I4fc6f270582bb02218144098427bc356b715c893
Reviewed-on: https://skia-review.googlesource.com/6083
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-12-14 19:48:56 +00:00
Robert Phillips
e305cc1f2a Partially defer GrSWMaskHelper
This is intended to position the writePixels in GrSWMaskHelper::toTexture for moving to GrSurfaceContext

Change-Id: I6c3d24eb3b1db3b0efc63f7f4f1240a7a00ee88a
Reviewed-on: https://skia-review.googlesource.com/6032
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-14 19:04:02 +00:00
Florin Malita
78c212a719 SK_API-export SkCodec
R=scroggo@google.com,reed@google.com

Change-Id: Ic9fba1919aeb2c5e92c053d43a41d33201abc37c
Reviewed-on: https://skia-review.googlesource.com/6080
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-12-14 18:55:47 +00:00
Leon Scroggins III
3639faada2 Add SkCodec::FrameInfo::fFullyReceived
This indicates whether the frame has been fully received, i.e. the
stream contains enough data to decode to the end of the frame.

A client may want to use this to know whether they should attempt to
decode this frame, if they do not want to decode partial frames.

Change-Id: I336c7031b0c0b8c1401ce040f5372aedc87fdc14
Reviewed-on: https://skia-review.googlesource.com/5703
Reviewed-by: Chris Blume <cblume@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2016-12-14 18:39:34 +00:00
Matt Sarett
8dcc84f7dc Prefer F16 in SkAndroidCodec for high precision images
Adapted from:
https://googleplex-android-review.git.corp.google.com/#/c/1707531/

TBR=djsollen@google.com
BUG=skia:

Change-Id: I21b99e8452e728aed70e8913677c253c1ae9f751
Reviewed-on: https://skia-review.googlesource.com/6023
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-12-14 15:59:15 +00:00
Robert Phillips
4a24da5cec Make filterMaskGPU use GrTextureProxy
This is a staging CL to position the writePixels in sw_draw_with_mask_filter to be moved to GrSurfaceContext

Change-Id: I808372d30ad4aca4a56125ea75d071f7a3747146
Reviewed-on: https://skia-review.googlesource.com/5926
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-14 14:48:19 +00:00
Robert Phillips
2734136b68 Add asDeferredTexture & asDeferredRenderTarget helpers to GrSurfaceContext
These are proving useful in the read/write-Pixels migration

Change-Id: I297f31968362d205977b769808320b1dc06249df
Reviewed-on: https://skia-review.googlesource.com/5936
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-14 14:35:52 +00:00
Robert Phillips
65115a1b1a Remove mutex guards from GrContext::readSurfacePixels
Change-Id: Ief4f0faae7abeb996bdfc993e368e64755da15a7
Reviewed-on: https://skia-review.googlesource.com/5929
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-14 13:04:01 +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
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
Brian Salomon
24f19780d1 Make GrRenderTargetContext::addDrawOp use sk_sp
Change-Id: Iff7f63635cdbc5cc51e5968a565f2fde2be3acb0
Reviewed-on: https://skia-review.googlesource.com/5932
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-13 20:48:50 +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
Mike Klein
db402cab8b add move semantics to SkTHash*
The more I look at std::unordered_map and co., the less I like them.
I think we might want to bet on SkTHash*.

As a simple first improvement, add move support.
Next comes shrinking, and then I'll start moving over SkTDynamicHash users.

BUG=skia:6053

Change-Id: Ifdb5d713aab66434ca271c7f18a0cbbb0720099c
Reviewed-on: https://skia-review.googlesource.com/5943
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2016-12-13 18:18:47 +00:00
Brian Salomon
0abc8b43fd Add helper for idenitfying hw GrAATypes.
Change-Id: I7f4e5d87706df24ffb94e41902e0746bd149d733
Reviewed-on: https://skia-review.googlesource.com/5922
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-13 18:10:31 +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
Mike Reed
4ec2b7179e don't use deprecated api
BUG=skia:

Change-Id: I25886b9cc8df9235b925582f15bea14fffe855db
NOTRY=True
Reviewed-on: https://skia-review.googlesource.com/5940
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-12-13 14:22:30 +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
Matt Sarett
966bb348a5 Decode to sRGB on Android
I want to land this so we can start testing color space aware
decoding on Android.  In particular, it will be interesting to
see how linear premultiplication will affect existing content.

This will only modify BitmapRegionDecoder behavior.  I'll
follow up with a similar change to BitmapFactory.cpp in Android.

This will cause image diffs on Gold.

BUG=skia:

Change-Id: Iffda5f035447f2608ce26945570b503f8971b735
Reviewed-on: https://skia-review.googlesource.com/5698
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-12-12 22:19:05 +00:00
Mike Reed
689169dcad Hide exotic clipops, with a private rename for internal use
BUG=skia:

Change-Id: I6c320a8c7fa501771d93c191c4657452cc9f2e03
Reviewed-on: https://skia-review.googlesource.com/5844
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-12-12 20:58:16 +00:00