Commit Graph

358 Commits

Author SHA1 Message Date
Brian Osman
dffe9827b1 Revert "Revert "Revert "Allow FPs to elevate default precision for the entire fragment program"""
This reverts commit ec53c636b7.

Reason for revert: Mali GMs look bad.

Original change's description:
> Revert "Revert "Allow FPs to elevate default precision for the entire fragment program""
> 
> This reverts commit 903c3f7040.
> 
> Reason for revert: Vulkan issue fixed in compiler.
> 
> Original change's description:
> > Revert "Allow FPs to elevate default precision for the entire fragment program"
> > 
> > This reverts commit 92d7ccafdf.
> > 
> > Reason for revert: Vulkan errors.
> > 
> > Original change's description:
> > > Allow FPs to elevate default precision for the entire fragment program
> > > 
> > > Currently, GrConfigConversionEffect is able to round-trip on many mobile
> > > GPUs because it uses highp for all intermediate variables (including the
> > > texture fetch result). Separating the texture sample into a different
> > > processor breaks that.
> > > 
> > > This is a blunt instrument, not to be used lightly.
> > > 
> > > Bug: skia:
> > > Change-Id: I2ab365e3da79628069e2eb727c43c2bf45bfd789
> > > Reviewed-on: https://skia-review.googlesource.com/10162
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Brian Osman <brianosman@google.com>
> > > 
> > 
> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,ethannicholas@google.com,reviews@skia.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > 
> > Change-Id: Iee5bb409f86a9cabecc76bd1273a5b3cef6af179
> > Reviewed-on: https://skia-review.googlesource.com/10967
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > 
> 
> TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,ethannicholas@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: I733a0ecc40b58d8727f0259b5498c8e6610cedce
> Reviewed-on: https://skia-review.googlesource.com/11010
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,ethannicholas@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ic3274a0a8b776e811354c3441391ffdc80678292
Reviewed-on: https://skia-review.googlesource.com/11061
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-04-03 14:34:21 +00:00
Brian Osman
ec53c636b7 Revert "Revert "Allow FPs to elevate default precision for the entire fragment program""
This reverts commit 903c3f7040.

Reason for revert: Vulkan issue fixed in compiler.

Original change's description:
> Revert "Allow FPs to elevate default precision for the entire fragment program"
> 
> This reverts commit 92d7ccafdf.
> 
> Reason for revert: Vulkan errors.
> 
> Original change's description:
> > Allow FPs to elevate default precision for the entire fragment program
> > 
> > Currently, GrConfigConversionEffect is able to round-trip on many mobile
> > GPUs because it uses highp for all intermediate variables (including the
> > texture fetch result). Separating the texture sample into a different
> > processor breaks that.
> > 
> > This is a blunt instrument, not to be used lightly.
> > 
> > Bug: skia:
> > Change-Id: I2ab365e3da79628069e2eb727c43c2bf45bfd789
> > Reviewed-on: https://skia-review.googlesource.com/10162
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > 
> 
> TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,ethannicholas@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: Iee5bb409f86a9cabecc76bd1273a5b3cef6af179
> Reviewed-on: https://skia-review.googlesource.com/10967
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> 

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

Change-Id: I733a0ecc40b58d8727f0259b5498c8e6610cedce
Reviewed-on: https://skia-review.googlesource.com/11010
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-31 20:40:05 +00:00
Brian Osman
903c3f7040 Revert "Allow FPs to elevate default precision for the entire fragment program"
This reverts commit 92d7ccafdf.

Reason for revert: Vulkan errors.

Original change's description:
> Allow FPs to elevate default precision for the entire fragment program
> 
> Currently, GrConfigConversionEffect is able to round-trip on many mobile
> GPUs because it uses highp for all intermediate variables (including the
> texture fetch result). Separating the texture sample into a different
> processor breaks that.
> 
> This is a blunt instrument, not to be used lightly.
> 
> Bug: skia:
> Change-Id: I2ab365e3da79628069e2eb727c43c2bf45bfd789
> Reviewed-on: https://skia-review.googlesource.com/10162
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> 

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

Change-Id: Iee5bb409f86a9cabecc76bd1273a5b3cef6af179
Reviewed-on: https://skia-review.googlesource.com/10967
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-31 16:55:39 +00:00
Robert Phillips
f7a7261b4a Add tracking of unique proxyID beside unique renderTargetID in auditTrail and clearOp
Split out of: https://skia-review.googlesource.com/c/10284/ (Omnibus: Remove GrSurface-derived classes from ops)

Change-Id: I5845a47d94decc455ec3b1f0a5876b1c82aa32e8
Reviewed-on: https://skia-review.googlesource.com/10750
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-31 16:11:30 +00:00
Brian Osman
92d7ccafdf Allow FPs to elevate default precision for the entire fragment program
Currently, GrConfigConversionEffect is able to round-trip on many mobile
GPUs because it uses highp for all intermediate variables (including the
texture fetch result). Separating the texture sample into a different
processor breaks that.

This is a blunt instrument, not to be used lightly.

Bug: skia:
Change-Id: I2ab365e3da79628069e2eb727c43c2bf45bfd789
Reviewed-on: https://skia-review.googlesource.com/10162
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-31 15:43:51 +00:00
Robert Phillips
7ee385e1dc Add GrSurfaceProxy* parameter to GrContext::flush
Split out of: https://skia-review.googlesource.com/c/10284/ (Omnibus: Remove GrSurface-derived classes from ops)

Change-Id: I12c66a6fa826c2363b21ece56391fb352d12d6b3
Reviewed-on: https://skia-review.googlesource.com/10541
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-30 12:55:37 +00:00
Herb Derby
b549cc38c8 Change SkMemory to the more accurately named SkMalloc.
Change-Id: I6b08a74234b99bac866bad71014b94f7ec2d4bc8
Reviewed-on: https://skia-review.googlesource.com/10188
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-27 18:13:07 +00:00
Brian Osman
ce425510a0 Add Swizzle FP, and remove swizzle logic from GrConfigConversionEffect
Trying to decompose read/writePixels into some reusable chunks.

BUG=skia:5853

Change-Id: If08b004b008e8ca7d464d9dc47068e487bae850a
Reviewed-on: https://skia-review.googlesource.com/10015
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-22 19:16:30 +00:00
Greg Daniel
70131b97f9 Fix SkTArray operator= to work with self assignment
BUG=skia:

Change-Id: I2a403a7ccbb87a030757f3e57d2ea53503f72512
Reviewed-on: https://skia-review.googlesource.com/10012
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-03-22 18:33:19 +00:00
Brian Salomon
d3b65972aa Mark overridden destructors with 'override' and remove 'virtual'
This silences a new warning in clang 5.0

Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8
Reviewed-on: https://skia-review.googlesource.com/10006
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-22 16:06:18 +00:00
Robert Phillips
0ae6faa34d Make SkImage_Gpu be deferred (take 2)
This CL removes the GrTexture-based ctor forcing everyone to create deferred SkImage_Gpus.

relanding of: https://skia-review.googlesource.com/c/6680/ (Make SkImage_Gpu be deferred)

split out into:
https://skia-review.googlesource.com/c/9106/ (Remove atlas creation from GrResourceProvider)

Change-Id: I834ede430b9706cf9b675bdfdddf1c8c624c2f14
Reviewed-on: https://skia-review.googlesource.com/9965
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-22 11:52:16 +00:00
Hal Canary
271d495a68 check-headers-self-sufficient: update
* Translate to python, use multiprocessing to make it wun in reasonanble time.
  * Fix three headers.
  * Move one header.

Change-Id: I0b26f912bb8086ec158d1c0bae76b923ec6121a4
Reviewed-on: https://skia-review.googlesource.com/8490
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-03-21 15:28:12 +00:00
Robert Phillips
eaa78c4500 Revert "Make SkImage_Gpu be deferred"
This reverts commit 0db235bc02.

Reason for revert: cc_unittests failing

Original change's description:
> Make SkImage_Gpu be deferred
> 
> This CL removes the GrTexture-based ctor forcing everyone to create deferred SkImage_Gpus.
> 
> split out into:
> https://skia-review.googlesource.com/c/9106/ (Remove atlas creation from GrResourceProvider)
> 
> Change-Id: I266bbe089c242fe54d5b7adcc7895aa5a39440a0
> Reviewed-on: https://skia-review.googlesource.com/6680
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: Ia15590a1fae04b52723713760fdbf0492ad36286
Reviewed-on: https://skia-review.googlesource.com/9962
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-21 13:26:22 +00:00
Robert Phillips
0db235bc02 Make SkImage_Gpu be deferred
This CL removes the GrTexture-based ctor forcing everyone to create deferred SkImage_Gpus.

split out into:
https://skia-review.googlesource.com/c/9106/ (Remove atlas creation from GrResourceProvider)

Change-Id: I266bbe089c242fe54d5b7adcc7895aa5a39440a0
Reviewed-on: https://skia-review.googlesource.com/6680
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-21 11:39:41 +00:00
Herb Derby
d7b34a5ca0 Make SkMemory.h and adjust all files for usage.
This will be rolled out in three stages:
1) make SkMemory.h and have SkTypes.h include it.
2) Adjust chromium and android.
3) no long include SkMemory.h in SkTypes.h

Change-Id: If360ef5e1164d88f50b03f279e2e963ca2f57d5d
Reviewed-on: https://skia-review.googlesource.com/9874
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-03-20 18:40:49 +00:00
Mike Reed
e88a1cb20e Revert[2] "More SkVertices implementation work""
The fix was to release the array of vertices in the picturerecorder
destructor (where we also release textblobs etc.

This reverts commit 1eb3fef136.

BUG=skia:

Change-Id: I3bf4acd6ad209205b0832a3cb7f94cd89dfcefc5
Reviewed-on: https://skia-review.googlesource.com/9826
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-17 14:27:33 +00:00
Mike Reed
1eb3fef136 Revert "More SkVertices implementation work"
This reverts commit 14583e11fd.

Reason for revert: leaking

Direct leak of 499104 byte(s) in 2112 object(s) allocated from:
    #0 0x1e195f0 in operator new(unsigned long) (/b/swarm_slave/w/irazbR79/out/Debug/dm+0x1e195f0)
    #1 0x3142b0a in SkVertices::Builder::init(SkCanvas::VertexMode, int, int, SkVertices::Sizes const&) (/b/swarm_slave/w/irazbR79/out/Debug/dm+0x3142b0a)


Original change's description:
> More SkVertices implementation work
> 
> - change virtuals to take const SkVertices*, as we do for TextBobs and Images
> - override onDrawVerticesObject in recording canvases
> - deserialize raw-vertices into SkVertices object
> 
> Possibly a follow-on would intercept the raw-form directly in canvas,
> and remove the virtual, and only support the object form.
> 
> BUG=skia:6366
> 
> Change-Id: I57a932667ccb3b3b004beb802ac3ae6898e3c6e0
> Reviewed-on: https://skia-review.googlesource.com/9633
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: I40bb7a20698ef6aa0a9ef71a3d6ac4c1473e081c
Reviewed-on: https://skia-review.googlesource.com/9825
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-17 13:09:52 +00:00
Mike Reed
14583e11fd More SkVertices implementation work
- change virtuals to take const SkVertices*, as we do for TextBobs and Images
- override onDrawVerticesObject in recording canvases
- deserialize raw-vertices into SkVertices object

Possibly a follow-on would intercept the raw-form directly in canvas,
and remove the virtual, and only support the object form.

BUG=skia:6366

Change-Id: I57a932667ccb3b3b004beb802ac3ae6898e3c6e0
Reviewed-on: https://skia-review.googlesource.com/9633
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-17 11:03:38 +00:00
Brian Salomon
69225d0250 Make SkTArray not allocate unless reserve or initial count > 0
This also makes it so that it doesn't shrink back into preallocated storage and therefore doesn't need to store the reserve count.

Change-Id: Ia320fed04c329641a5494947db39cefd2fb6d80f
Reviewed-on: https://skia-review.googlesource.com/9531
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-16 13:08:04 +00:00
Robert Phillips
a4c41b3e83 Push setMipColorMode calls further down-stack & add to GrTextureProxy
setMipColorMode seems like an odd call. 

Change-Id: I24a1ac3883d52499f3be27282d006144d15b26f1
Reviewed-on: https://skia-review.googlesource.com/9725
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-15 18:34:32 +00:00
Robert Phillips
26c90e0479 Add GrRenderTargetContext::resourceProvider & GrResourceProvider::caps
and retract GrSurfaceContextPriv a bit

Change-Id: Id47af1052f9bda4fe7c85b3ce46b3ebe37797524
Reviewed-on: https://skia-review.googlesource.com/9647
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-14 21:23:44 +00:00
Robert Phillips
d3749485db Consolidate Proxy caching code in GrResourceProvider
This doesn't implement the GrSurfaceProxy-based caching but just carves out a space for it.

Split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: Iec87b45e3264b349d7804f63e361e970b925e335
Reviewed-on: https://skia-review.googlesource.com/9626
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-14 14:09:12 +00:00
Robert Phillips
4f7062378e Restore deferred GPU resources in Chrome
Change-Id: Ib52668b46e7d077175dcba12a3ccc8abc1f0c7a9
Reviewed-on: https://skia-review.googlesource.com/9552
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-13 16:25:45 +00:00
Florin Malita
d54639f768 Add SkSTArray move assignment operators
Change-Id: Ib655a8a4d62c27dee4f92fcb644237f6fbbdb75b
Reviewed-on: https://skia-review.googlesource.com/9510
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-03-12 15:15:14 +00:00
Florin Malita
053730de73 Fix SkTHashTable dangling values
The element rearrange logic in SkTHashTable::remove() marks empty slots
as such, but does not reset their value.

When breaking out of the rearrange loop, we must also reset the last empty
slot value to avoid retaining unwanted copies.

Change-Id: I8ba2a25088c0aa5210277124e0917224cb295691
Reviewed-on: https://skia-review.googlesource.com/9533
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-03-10 17:28:04 +00:00
Robert Phillips
b726d58efc Partially defer SkImage_Gpu
One of SkImageCacherator, GrBitmapTextureMaker, GrImageTextureMaker, GrTextureAdjuster, GrTextureProducer or SkImage has to take the first step. This is probably the least odd of the options.

Change-Id: Ie167034553451f4b3633a5a1548dbd4d75839b3d
Reviewed-on: https://skia-review.googlesource.com/9488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-10 15:02:11 +00:00
Mike Reed
6c14c8db4b take fast case in swap() if we're using malloc OR we're empty
This avoids taking the (more expensive) copy case when we don't need to.
The old behavior only took this fast case if we were "actively" using
a dynamically allocated array.

BUG=skia:

Change-Id: I0f606ba83ff4aff3a8fc282db7a3ce1b0191fb1a
Reviewed-on: https://skia-review.googlesource.com/9521
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-09 22:26:12 +00:00
Brian Osman
383dd9dc58 Remove unused ownership argument to GrSurfaceProxy::MakeWrappedBackend
This is the last public reference to GrWrapOwnership, so removal paves
the way for moving it to somewhere internal.

BUG=skia:

Change-Id: I876298642ff812452a644c1d2b9519691eac44b9
Reviewed-on: https://skia-review.googlesource.com/9492
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-09 19:21:22 +00:00
Florin Malita
c2d5bd0117 Fix SkTArray copy construction
We can't use memcpy for copy construction, even when MEM_COPY == true.

Change-Id: I50eb369f0fbf77e8f0ad5a148c67d46df0d3ab0e
Reviewed-on: https://skia-review.googlesource.com/9487
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-03-09 19:17:16 +00:00
Florin Malita
b1d800dc22 SkSTArray move ctor
Change-Id: Ice90a229e1ca5959b365c678e8df332cd6ed4a03
Reviewed-on: https://skia-review.googlesource.com/9489
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-03-09 18:21:09 +00:00
Herb Derby
3139de39d7 Remove SkChunckAlloc
Change-Id: Ia400dd2d8aa398cf53852acd71c4a45228752496
Reviewed-on: https://skia-review.googlesource.com/9328
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-03-08 20:06:15 +00:00
Mike Klein
4b19b40394 Revert "Fix new IT blocks ARMv8"
This reverts commit 90165c2269.

Reason for revert: Skia and Chrome iOS builds broken.

../../third_party/skia/include/private/SkFixed.h:106:41: error: invalid output constraint '+t' in asm
        asm("vcvt.s32.f32 %0, %0, #16": "+t"(x));


Original change's description:
> Fix new IT blocks ARMv8
> 
> ARMv8 specifies that an IT block should be followed by only one 16-bit instruction.
> * SkFloatToFix is back to a C implementation that mirrors the assembly code.
> 
> * S32A_D565_Opaque_neon switched the usage of the temporary 'ip' register to let
> the compiler choose what is best in the context of the IT block. And replaced
> 'keep_dst' by 'ip' where low register or high register does not matter.
> 
> BUG=skia:
> 
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
> 
> Change-Id: I096759841c972e9300c1d0293bc80d3c3ff2747b
> Reviewed-on: https://skia-review.googlesource.com/9340
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,amaury.leleyzour@arm.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Idbcbda88039066153e1c34233d43366ab114fd01
Reviewed-on: https://skia-review.googlesource.com/9332
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-07 00:55:02 +00:00
Amaury Le Leyzour
90165c2269 Fix new IT blocks ARMv8
ARMv8 specifies that an IT block should be followed by only one 16-bit instruction.
* SkFloatToFix is back to a C implementation that mirrors the assembly code.

* S32A_D565_Opaque_neon switched the usage of the temporary 'ip' register to let
the compiler choose what is best in the context of the IT block. And replaced
'keep_dst' by 'ip' where low register or high register does not matter.

BUG=skia:

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

Change-Id: I096759841c972e9300c1d0293bc80d3c3ff2747b
Reviewed-on: https://skia-review.googlesource.com/9340
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-06 22:16:17 +00:00
Brian Osman
32342f032e Rebase and fix chromium
Combine texture provider and resource provider

Largely mechanical. Only three places that were calling createApprox
via texture provider (ie without flags), so that was simple.

BUG=skia:

Change-Id: I876367bcdc6a8db736deedab1028de1972015509
Reviewed-on: https://skia-review.googlesource.com/9176
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-04 13:49:47 +00:00
Robert Phillips
2f49314227 Make GrSurface::MakeDeferred return sk_sp<GrTextureProxy>
This should make upcoming changes less tedious

Change-Id: I313ae9df724f109a64cf5708a974e8bfeb963025
Reviewed-on: https://skia-review.googlesource.com/9183
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-03 12:35:27 +00:00
Brian Salomon
5ff3a5c13e Remove stencil related flags from GrInstancedPipelineInfo.
Change-Id: Ieeb8ada92b5196473d5cea77350fd994bfff8916
Reviewed-on: https://skia-review.googlesource.com/9086
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-01 20:16:45 +00:00
Robert Phillips
7928e76872 Disable deferred gpu resources for Chrome branch
Chrome's branch is coming up and it seems unlikely that I will be able to push instantiation all the way to flush time (where failure will be easier to deal with) before then. This CL should silence the P1 bug but could introduce layout test diffs.

Ideally this wouldn't land until after: https://codereview.chromium.org/2718353004/ (Add flag for upcoming Skia change) so the layout test differences will be visible on the DEPS roll

BUG=688811

Change-Id: I86c42ee02e6672834353aa7126b00ed4f3521948
Reviewed-on: https://skia-review.googlesource.com/9064
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-01 12:30:02 +00:00
Brian Salomon
dac5f6bcbe Fix -Wshadow-field warnings
BUG=skia:

Change-Id: I44f1e11787eab88bdc5ed25c34ea802e9001d427
Reviewed-on: https://skia-review.googlesource.com/9083
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-02-28 21:49:28 +00:00
Robert Phillips
c787e495e2 Allow GrSurfaceProxy-derived classes to use flags when instantiating (take 2)
In some instances proxies must be created that, when instantiated, have no pending IO.

This is split out of:

https://skia-review.googlesource.com/c/8679/ (Add per-Flush callback to GrDrawingManager)

and is a reland of:

https://skia-review.googlesource.com/c/8988/ ( Allow GrSurfaceProxy-derived classes to use flags when instantiating)

Change-Id: I36f52a6d249e762bdfc1f0d7528aba6d4071e492
Reviewed-on: https://skia-review.googlesource.com/9070
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-28 17:21:55 +00:00
Robert Phillips
2411c1112e Revert "Allow GrSurfaceProxy-derived classes to use flags when instantiating"
This reverts commit c8f1e3a5c0.

Reason for revert: check on ANGLE failure
Original change's description:
> Allow GrSurfaceProxy-derived classes to use flags when instantiating
> 
> In some instances proxies must be created that, when instantiated, have no pending IO.
> 
> This is split out of: (Add per-Flush callback to GrDrawingManager)
> 
> https://skia-review.googlesource.com/c/8679/
> 
> Change-Id: I68b5504d35ad436a4ae737ac4bb3c171fc9a5826
> Reviewed-on: https://skia-review.googlesource.com/8988
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

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

Change-Id: I157417c443028b2148ee355ce69c946a96bb9407
Reviewed-on: https://skia-review.googlesource.com/9066
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-28 15:06:07 +00:00
Robert Phillips
c8f1e3a5c0 Allow GrSurfaceProxy-derived classes to use flags when instantiating
In some instances proxies must be created that, when instantiated, have no pending IO.

This is split out of: (Add per-Flush callback to GrDrawingManager)

https://skia-review.googlesource.com/c/8679/

Change-Id: I68b5504d35ad436a4ae737ac4bb3c171fc9a5826
Reviewed-on: https://skia-review.googlesource.com/8988
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-28 13:40:19 +00:00
Robert Phillips
30f9bc69cf Switch GrTextureStripAtlas over to GrTextureProxies
This is split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: I9f602985b6010fc58b595e2be6d4e67e50179747
Reviewed-on: https://skia-review.googlesource.com/8881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-23 15:01:42 +00:00
Mike Klein
19eec39c90 Fix SkSemaphore comments.
Change-Id: I14fc03fcb73bad61daed7c4cd3ed12bfae6b1217
Reviewed-on: https://skia-review.googlesource.com/8880
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-22 20:11:54 +00:00
Mike Klein
384b90af5c SkExecutor
Refactoring to refamiliarize myself with SkTaskGroup and SkThreadPool.

This adds an SkExecutor interface to describe how we use SkThreadPool,
with a global setter and getter for a default instance.  Then I rewrote
SkTaskGroup to work with any executor, the global default by default.

I also think I've made the SkTaskGroup::wait() borrow logic clearer
with the addition of SkSemaphore::try_wait().  This lets me keep the
semaphore count and actual count of work in perfect sync.

Change-Id: I6bbdfaeb0e2c3a43daff6192d34bc4a3f7210178
Reviewed-on: https://skia-review.googlesource.com/8836
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-22 16:17:39 +00:00
Robert Phillips
63c67461ed Tighten up GrSurfaceProxy typing
This may reduce the number of "why not GrTextureProxy" issues

Change-Id: I9e0e5042f5801ba9a933b697a380cb0cb54b4522
Reviewed-on: https://skia-review.googlesource.com/8510
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-02-15 20:17:29 +00:00
csmartdalton
320ade43f5 Make SkAutoTMalloc movable
BUG=skia:

Change-Id: I683407659c252656445b92734484170587c2f75a
Reviewed-on: https://skia-review.googlesource.com/8360
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-02-13 19:46:35 +00:00
Mike Reed
267be7fbc3 Revert "Revert "IWYU""
This reverts commit 3c727d2386.

BUG=skia:

Change-Id: I72e9b40fec96d044e0ac12906669a52529e77882
Reviewed-on: https://skia-review.googlesource.com/8356
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-13 15:59:35 +00:00
Robert Phillips
3c727d2386 Revert "IWYU"
This reverts commit 2aeae78a2c.

Reason for revert: It looks like this is breaking the android roll

out/target/product/angler/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_graphics_Canvas.o frameworks/base/core/jni/android_graphics_Canvas.cpp"
frameworks/base/core/jni/android_graphics_Canvas.cpp:178:15: error: incomplete type 'SkRegion' named in nested name specifier



Original change's description:
> IWYU
> 
> BUG=skia:
> 
> Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee
> Reviewed-on: https://skia-review.googlesource.com/8231
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: If979c3dd9dc3fe08ac450ced113b3d1e9a86f02a
Reviewed-on: https://skia-review.googlesource.com/8346
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-02-11 01:25:19 +00:00
Mike Reed
2aeae78a2c IWYU
BUG=skia:

Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee
Reviewed-on: https://skia-review.googlesource.com/8231
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-10 19:43:03 +00:00
Florin Malita
63b6156273 Fixed3232 overflow in LinearGradientContext::shadeSpan()
Speculative fix for TAP ubsan failures.

Change-Id: Id3a78adbfab04ba3404a23059cbd8c162d812c2e
Reviewed-on: https://skia-review.googlesource.com/8315
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-02-10 16:17:35 +00:00