Commit Graph

572 Commits

Author SHA1 Message Date
Greg Daniel
0fb6db4be6 Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
This reverts commit 33d17cbb00.

Reason for revert: broke intel bots

Original change's description:
> Add private grpixelconfigs for alpha_8 and alpha_half
> 
> Bug: skia:
> Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> Reviewed-on: https://skia-review.googlesource.com/71763
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/72180
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-15 20:49:03 +00:00
Brian Salomon
559f556d9d Remove support for image load/store
This isn't used and has become a maintenance burden.

Change-Id: I5f3af8f91e5c4f073fe4ea30e0a7f1f61efeea47
Reviewed-on: https://skia-review.googlesource.com/70640
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-15 20:06:12 +00:00
Greg Daniel
33d17cbb00 Add private grpixelconfigs for alpha_8 and alpha_half
Bug: skia:
Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
Reviewed-on: https://skia-review.googlesource.com/71763
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-15 20:02:43 +00:00
Greg Daniel
ab081ae7e4 Move static helper functions for GrPixelConfig to private.
Bug: skia:
Change-Id: I207cce77cbe46e0016afe932a06dba12e732c5da
Reviewed-on: https://skia-review.googlesource.com/71281
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-14 17:14:34 +00:00
Ethan Nicholas
aae47c878b sksl enum support
Bug: skia:
Change-Id: I4d505b31cf8b59de12bcdbca410aafc085977ba9
Reviewed-on: https://skia-review.googlesource.com/68621
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-13 14:36:40 +00:00
Robert Phillips
2d9cb57c83 Revert "Patch up ref counting of proxies"
This reverts commit 8d5ce2d9ed.

Reason for revert: ASAN failures

Original change's description:
> Patch up ref counting of proxies
> 
> Bug: skia:
> Change-Id: If746283d788368bf7aad6d285f181d8531768e61
> Reviewed-on: https://skia-review.googlesource.com/70024
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ia2addb2a5dacad9e9c0080d1e53084bc62b780e0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/70540
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-11-13 13:38:11 +00:00
Robert Phillips
8d5ce2d9ed Patch up ref counting of proxies
Bug: skia:
Change-Id: If746283d788368bf7aad6d285f181d8531768e61
Reviewed-on: https://skia-review.googlesource.com/70024
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-11-13 13:22:20 +00:00
Ethan Nicholas
1706f84208 switched GrClipEdge to an enum class
Bug: skia:
Change-Id: Idf41580314a32739c70721530fc3ca48e566b044
Reviewed-on: https://skia-review.googlesource.com/70023
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-10 17:42:27 +00:00
Ethan Nicholas
0f3c73220a renamed GrPrimitiveEdgeType / GrProcessorEdgeType to GrClipEdgeType
Bug: skia:
Change-Id: I4a9af0b9b2cfa47875b2ba098098183e8dca29a7
Reviewed-on: https://skia-review.googlesource.com/69601
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-09 20:59:27 +00:00
Mike Klein
ea000ff330 remove SkFixedMul_arm()
The portable SkFixedMul_longlong (here now renamed SkFixedMul)
generates shorter, equivalent code,

from
   0:   fb81 0200       smull   r0, r2, r1, r0
   4:   ea4f 4010       mov.w   r0, r0, lsr #16
   8:   ea40 4002       orr.w   r0, r0, r2, lsl #16

to
   0:   fb81 0100       smull   r0, r1, r1, r0
   4:   0c00            lsrs    r0, r0, #16
   6:   ea40 4001       orr.w   r0, r0, r1, lsl #16

(Notice, 2 bytes saved.)

Change-Id: Icb0f7e6d4379086fc602f956a4beb1265a9759bc
Reviewed-on: https://skia-review.googlesource.com/69440
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-11-09 18:22:44 +00:00
Ben Wagner
31366872a5 Guard VFPv3 ASM with an ifdef.
Change-Id: Id31de8dc0d9d68369896f2686068b29e07135a39
Reviewed-on: https://skia-review.googlesource.com/68641
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-11-09 17:46:44 +00:00
Robert Phillips
f8e2502819 Prepare to enable explicit gpu resource allocation (take 2)
Change-Id: I3fd78d53e8bea84c0217b9fe6e180eaa9e4ac753
Reviewed-on: https://skia-review.googlesource.com/68920
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-11-08 21:00:37 +00:00
Greg Daniel
065b41dd90 Revert "Prepare to enable explicit gpu resource allocation"
This reverts commit f290376736.

Reason for revert: Changed generated effect instead of FP

Original change's description:
> Prepare to enable explicit gpu resource allocation
> 
> Change-Id: I407e45711c61831febbac3d3d3a88e3fdde92c5f
> Reviewed-on: https://skia-review.googlesource.com/68212
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I949500d94c7461b7cf38d615117cfcdc9a791780
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/68900
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-08 19:58:58 +00:00
Robert Phillips
f290376736 Prepare to enable explicit gpu resource allocation
Change-Id: I407e45711c61831febbac3d3d3a88e3fdde92c5f
Reviewed-on: https://skia-review.googlesource.com/68212
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-08 19:06:17 +00:00
Chris Dalton
e4aa0c4207 Disable CCPR while we sort out clipping
The current usage of CCPR by clipping code is suboptimal. This is
causing regressions on the bots and projects like Flutter that make
heavy use of clipPath. Disabling CCPR while we fix it up.

Bug: skia:7190
Bug: flutter:12839
Change-Id: I03af5249b53cf2eab5a13d85a5f87708030c8666
Reviewed-on: https://skia-review.googlesource.com/67920
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-06 16:40:39 +00:00
Greg Daniel
65c7f662ba Add mip support to GrAHardwareBufferImageGenerator
Bug: skia:
Change-Id: I482d8f9937c86ed441016afef2d8f924282dd17a
Reviewed-on: https://skia-review.googlesource.com/63861
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-30 19:18:03 +00:00
Chris Dalton
a045eea29e CCPR: use 16-bit ints for the atlas offset attrib
Bug: skia:
Change-Id: I053e8416ced317b6ebc46cc8189840d60c7f91e8
Reviewed-on: https://skia-review.googlesource.com/62060
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-10-25 15:44:05 +00:00
Chris Dalton
51ebd6615f Add vector GrSLTypes for shorts
Bug: skia:
Change-Id: I686950df9f5470b4885823471957c3859cc692ea
Reviewed-on: https://skia-review.googlesource.com/63441
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-25 00:05:05 +00:00
Chris Dalton
6dd0d8a265 Revert "Add vector GrSLTypes for shorts"
This reverts commit af37a53a84.

Reason for revert: Compiler errors

Original change's description:
> Add vector GrSLTypes for shorts
> 
> Bug: skia:
> Change-Id: Icb9eb1fcb0f879cd0bfdd27d06459843361c9947
> Reviewed-on: https://skia-review.googlesource.com/62943
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: Ib23b28be92e199459fe1666fb1ec0e46e141a8f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/63460
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-24 19:53:23 +00:00
Chris Dalton
af37a53a84 Add vector GrSLTypes for shorts
Bug: skia:
Change-Id: Icb9eb1fcb0f879cd0bfdd27d06459843361c9947
Reviewed-on: https://skia-review.googlesource.com/62943
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-24 19:18:32 +00:00
Greg Daniel
e252f08982 Add hint to SkSurface::MakeRenderTarget that we will use mips
Additionally this changed triggered a cascade of plumbing GrMipMapped
down throughout Ganesh.

Bug: skia:
Change-Id: I4181f44d9046d66139bb491c7abf86703305aaeb
Reviewed-on: https://skia-review.googlesource.com/63000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-23 20:25:59 +00:00
Ben Wagner
7a0248f738 Compute inverse gamma table at compile time.
This introduces skstd::index_sequence and skstd::make_index_sequence so
that these can be used in C++11. These are mostly equivalent to their
std:: counterparts. This also introduces SkMakeArray<N, C>
which is constexpr and creates a std::array with N elements with each
element being initialized with the value of C(i) where i is the index of
the element.

These are then used to create inverse gamma table at compile time. This
avoids threading issues.

BUG=skia:7187

Change-Id: I61fb10a778898652e546d54c104a08d6e6bf88d3
Reviewed-on: https://skia-review.googlesource.com/61380
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-10-18 19:43:18 +00:00
Ben Wagner
d71c6d1994 Make SkTFitsIn and SkTo constexpr.
Because what can be better than marking things that can be constexpr as
constexpr. Also, I have a change where this would be nice to have.

Change-Id: Ie313b19d1930b98ddcd60cc17a320971625f18e3
Reviewed-on: https://skia-review.googlesource.com/60862
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-10-17 22:48:51 +00:00
Chris Dalton
a2ac30da36 Enable CCPR for volatile paths
Enables for volatile paths and when path mask caching is disabled.

Bug: skia:
Change-Id: I644b17f2a4f77a4ddf85265f520599499c0800cf
Reviewed-on: https://skia-review.googlesource.com/60481
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-17 18:48:42 +00:00
Greg Daniel
0fc4d2d269 Use enum to track MipMapsStatus throughout Texture creation
Bug: skia:
Change-Id: I1de1105d74b45f7b02ff52e6b8333801d98ef1ce
Reviewed-on: https://skia-review.googlesource.com/58501
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-12 16:12:42 +00:00
Mike Reed
e07622386b clone saturating cast code for doubles
Bug: skia:
Change-Id: I4f35413995cf73c6f130476d6b36e530120aa7ed
Reviewed-on: https://skia-review.googlesource.com/57901
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-10 19:58:13 +00:00
Robert Phillips
a108c92ae5 Fix drawSpecialImage
W/o this fix the strict constraint on the specialImage draws can sometimes be removed. This CL ensures that the temporary SkImage always has the actual dimensions of the special Image.

Note: the replacement of full screen clears w/ draws revealed this bug b.c. the image filters were only drawing a rect for the content area of the special images. Thus when the final DAG result was drawn to the canvas some of the bleed through (from the removal of the strict constraint) was showing.

Bug: 755871, 768134
skbug.com/7122

Change-Id: Id67b7143225c24b716e260c973f3bbf68f20188a
Reviewed-on: https://skia-review.googlesource.com/57660
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-10-10 15:41:42 +00:00
Ben Wagner
63fd760a37 Remove trailing whitespace.
Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.

Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-09 21:20:34 +00:00
Chris Dalton
4ba211f68f Revert "Enable coverage counting path rendering except on Android framework"
This reverts commit 196efbf71c.

Reason for revert: 1k SKPs GPU bot fails, perf regressions to look into.

Original change's description:
> Enable coverage counting path rendering except on Android framework
> 
> Android framework will come after collecting a bit more data.
> 
> Bug: skia:
> Change-Id: I6f4738e457f09c976b8bf282153ca75160a1d91c
> Reviewed-on: https://skia-review.googlesource.com/55563
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: I3f1a7022414ccec80541772d9912065fa4efd74e
Reviewed-on: https://skia-review.googlesource.com/57300
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-09 18:41:44 +00:00
Chris Dalton
196efbf71c Enable coverage counting path rendering except on Android framework
Android framework will come after collecting a bit more data.

Bug: skia:
Change-Id: I6f4738e457f09c976b8bf282153ca75160a1d91c
Reviewed-on: https://skia-review.googlesource.com/55563
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-07 07:34:20 +00:00
Greg Daniel
e1da1d9a7d Add option to create a deferred render target context with mips
We need this since we have texture generators that draw the base level
but nothing more. Thus we want them to be able to directly draw into
a pre allocated mipped target instead of doing a copy later.

TBR: bsalomon@google.com
Bug: skia:
Change-Id: I1dfae0da7153b21b30fdfa51a7061fc255739a1e
Reviewed-on: https://skia-review.googlesource.com/54100
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-06 20:28:00 +00:00
Brian Osman
099fa0fb98 Revert^6 "Make threaded proxy generation MDB-friendly, and defer instantiation"
ANGLE bots were getting lots of corrupted GMs - we set fPreferVRAMUseOverFlushes
to false. In that case, multiple deferred proxies were instantiating to the same
scratch resource. Any proxy that we're going to fill with an ASAP upload needs
to have no pending IO - we hoist all those loads to the front of the flush, so
normal IO tracking doesn't really help.

Bug: skia:
Change-Id: Id36fd8700e522db412a3c992b93c778e2ebb1188
Reviewed-on: https://skia-review.googlesource.com/53940
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-02 21:04:08 +00:00
Brian Osman
9b1f4bd176 Revert "Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"""""
This reverts commit fdd2cb52b7.

Reason for revert: ANGLE gold failures

Original change's description:
> Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""""
> 
> This reverts commit 9f8d4d36b5.
> 
> Bug: skia:
> Change-Id: I8d7c1df24d8b13b94404f3d9ba69a1ab55ee00c0
> Reviewed-on: https://skia-review.googlesource.com/52920
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: Ie461de167fbd37323cabd4adf064f99204ba4878
Reviewed-on: https://skia-review.googlesource.com/53801
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-02 14:00:07 +00:00
Jim Van Verth
f57c6de784 Revert "Enable coverage counting path rendering on non-Android"
This reverts commit c739b7260a.

Reason for revert: Turning tree red.
Original change's description:
> Enable coverage counting path rendering on non-Android
> 
> Bug: skia:
> Change-Id: Ife4c4378bf4323fb4a58fecfade09320ebc28026
> Reviewed-on: https://skia-review.googlesource.com/53000
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=djsollen@google.com,csmartdalton@google.com,reed@google.com

Change-Id: I89ef472a95320ff21684ca697295cd8b3939322e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/53522
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-09-29 18:42:25 +00:00
Chris Dalton
c739b7260a Enable coverage counting path rendering on non-Android
Bug: skia:
Change-Id: Ife4c4378bf4323fb4a58fecfade09320ebc28026
Reviewed-on: https://skia-review.googlesource.com/53000
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-09-29 16:36:24 +00:00
Brian Osman
fdd2cb52b7 Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""""
This reverts commit 9f8d4d36b5.

Bug: skia:
Change-Id: I8d7c1df24d8b13b94404f3d9ba69a1ab55ee00c0
Reviewed-on: https://skia-review.googlesource.com/52920
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-29 13:48:54 +00:00
Brian Osman
9f8d4d36b5 Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"""
This reverts commit e8b8397664.

Reason for revert: More crashing.

Original change's description:
> Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""
> 
> This reverts commit 837c6c7c0c.
> 
> Bug: skia:
> Change-Id: I1821f1b2b772c67f1b749692b398eb757d8073c9
> Reviewed-on: https://skia-review.googlesource.com/52744
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I1c8a81ed1000446c298d646d2cd5e7ebd212f18c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/52860
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-28 17:45:32 +00:00
Brian Osman
e8b8397664 Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""
This reverts commit 837c6c7c0c.

Bug: skia:
Change-Id: I1821f1b2b772c67f1b749692b398eb757d8073c9
Reviewed-on: https://skia-review.googlesource.com/52744
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-28 17:19:58 +00:00
Brian Osman
837c6c7c0c Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"
This reverts commit 742f3d02a1.

Reason for revert: Aaah!

Original change's description:
> Make threaded proxy generation MDB-friendly, and defer instantiation
> 
> Replaces GrPrepareCallback with GrDeferredProxyUploader, stored directly
> on GrTextureProxy. Op lists now store a list of referenced proxies that
> are being generated by worker threads. At flush time, iterate over those
> proxies, and invoke their uploader.
> 
> Lifetime of the uploader object is now tied to the proxy, but the ASAP
> upload function will free the proxy's uploader, if it's called.
> 
> Bug: skia:
> Change-Id: Ieb2c6a805d19990012839a8e103c3ca5b8d3dfc6
> Reviewed-on: https://skia-review.googlesource.com/49904
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I8f76a67044dc4159f903097d8b1ef19ffb48c730
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/52760
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-28 15:14:40 +00:00
Brian Osman
742f3d02a1 Make threaded proxy generation MDB-friendly, and defer instantiation
Replaces GrPrepareCallback with GrDeferredProxyUploader, stored directly
on GrTextureProxy. Op lists now store a list of referenced proxies that
are being generated by worker threads. At flush time, iterate over those
proxies, and invoke their uploader.

Lifetime of the uploader object is now tied to the proxy, but the ASAP
upload function will free the proxy's uploader, if it's called.

Bug: skia:
Change-Id: Ieb2c6a805d19990012839a8e103c3ca5b8d3dfc6
Reviewed-on: https://skia-review.googlesource.com/49904
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-28 14:46:07 +00:00
Robert Phillips
420c4cfcd7 Add GrTextureProxyPriv
Several upcoming additions should go in here

Change-Id: I642f3c7cc36b1e6512ee0170640449e88a666d2c
Reviewed-on: https://skia-review.googlesource.com/52661
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-28 13:23:37 +00:00
Ethan Nicholas
fa7ee2447e changed vertex attribute precisions to be actual types
Bug: skia:
Change-Id: Ic5555d9f1be7f24655bdea9f2a3677bfb128ef70
Reviewed-on: https://skia-review.googlesource.com/50221
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-27 14:04:17 +00:00
Brian Osman
acbdb5d990 Remove unused function with an incorrect assert
Bug: skia:
Change-Id: I4003085fbb1cadc4aeb2e950f1a9f44f96d03a93
Reviewed-on: https://skia-review.googlesource.com/50240
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-22 19:50:19 +00:00
Ethan Nicholas
8aa4569c13 switched SkSL's temporary 'highfloat' type back to 'float'
Bug: skia:
Change-Id: If0debae7318b6b5b4a7cb85d458996a09931127e
Reviewed-on: https://skia-review.googlesource.com/48760
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-09-22 13:54:38 +00:00
Brian Salomon
b7d42e3c11 Don't deserialize pathref oval/rrect bits
Change-Id: Id891329ee789347fb269d41bef9991f85233e031
Reviewed-on: https://skia-review.googlesource.com/49771
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-09-22 13:03:07 +00:00
Mike Klein
5e996b85db no_sanitize is Clang 3.7+
Change-Id: Ifa67c3e5cc188db71fab389f20f55e7cbfc6de8d
Reviewed-on: https://skia-review.googlesource.com/49747
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2017-09-21 18:23:03 +00:00
Mike Klein
3b7658a475 Teach TSAN directly about semaphore_t.
Instead of teaching TSAN than SkMutex is a lock to get around it not
understanding Mach semaphore_t routines, teach it that there is a
happens-before relationship between semaphore_signal() and
semaphore_wait().

This reverts commit e395bf2d18.
New changes are entirely restricted to SkSemaphore.cpp.

Change-Id: I27f647b93c48e81e8327db849881d669c4cd3d04
Reviewed-on: https://skia-review.googlesource.com/49180
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-21 17:09:40 +00:00
Robert Phillips
ae7d3f3992 Add native caching of uniquely keyed GrTextureProxies (take 2)
TBR=bsalomon@google.com

Change-Id: I590dcdc85fb60706c7eb06277694791dc04c9141
Reviewed-on: https://skia-review.googlesource.com/49543
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-21 13:52:10 +00:00
Robert Phillips
76d640d14e Revert "Add native caching of uniquely keyed GrTextureProxies"
This reverts commit d4f100dad9.

Reason for revert: ASAN

Original change's description:
> Add native caching of uniquely keyed GrTextureProxies
> 
> Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
> Reviewed-on: https://skia-review.googlesource.com/48300
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I7bbf549d4855ce6d985867c3880eef80080bd3d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/49442
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-20 20:50:50 +00:00
Robert Phillips
d4f100dad9 Add native caching of uniquely keyed GrTextureProxies
Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
Reviewed-on: https://skia-review.googlesource.com/48300
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-09-20 20:21:50 +00:00
Brian Osman
9a725dd948 Use shader based blending to clamp kPlus mode w/F16
Bug: skia:6173
Change-Id: I21042d484d9a7b3eee04aa3301d9793d00ad6908
Reviewed-on: https://skia-review.googlesource.com/48183
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-20 14:28:03 +00:00
Mike Klein
e395bf2d18 Mac TSAN support: annotate Sk[Base]Mutex as a mutex.
TSAN does not intercept Mach semaphore_t calls used to implement
SkBaseMutex's fSemaphore (its OSSemaphore field).  We can teach
it that Sk[Base]Mutex is a mutex anyway with the same annotations
we use for SkSharedMutex.

Change-Id: Ib91928bb9fcfa94f5cea985b46dea31ff2b56963
Reviewed-on: https://skia-review.googlesource.com/48580
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-09-19 18:05:50 +00:00
Ethan Nicholas
f7b8820dc8 re-land of new SkSL precisions
Bug: skia:
Change-Id: Ic1deb3db2cbda6ca45f93dee99832971a36a2119
Reviewed-on: https://skia-review.googlesource.com/47841
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-09-18 18:32:13 +00:00
Mike Klein
7791b94dcd expand on sk_double_to_float() comment
I want to make sure we've got our reasoning straight
as we start to use this more.

Change-Id: I64b8351549a59e118f564e8505d42a0a620449c1
Reviewed-on: https://skia-review.googlesource.com/47840
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-09-18 15:03:29 +00:00
Ethan Nicholas
27185a9b97 Revert "Revert "Revert "Switched highp float to highfloat and mediump float to half."""
This reverts commit 05d5a13fea.

Reason for revert: looks like it broke filterfastbounds

Original change's description:
> Revert "Revert "Switched highp float to highfloat and mediump float to half.""
> 
> This reverts commit 1d816b92bb.
> 
> Bug: skia:
> Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1
> Reviewed-on: https://skia-review.googlesource.com/46464
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: Iddf6aef2ab084aa73da7ceebdfc303a1d2b80cde
Reviewed-on: https://skia-review.googlesource.com/47441
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-18 03:01:47 +00:00
Ben Wagner
05c474b309 Suppress float-cast-overflow in SkPoint::Length.
Bug: skia:4632
Change-Id: I0f8a7d7a11fc76fcb315c3f0183577c3f0958926
Reviewed-on: https://skia-review.googlesource.com/47421
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-09-16 22:44:33 +00:00
Ethan Nicholas
05d5a13fea Revert "Revert "Switched highp float to highfloat and mediump float to half.""
This reverts commit 1d816b92bb.

Bug: skia:
Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1
Reviewed-on: https://skia-review.googlesource.com/46464
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-15 18:50:54 +00:00
Mike Klein
1170a553be Don't allow iteration through non-finite points.
Added a unit test too.

BUG=chromium:756563

Change-Id: Ic77a89b4a98d1a553877af9807a3d3bdcd077bb9
Reviewed-on: https://skia-review.googlesource.com/44420
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-09-08 19:56:38 +00:00
Brian Salomon
2bbdcc44c6 Rework GrSamplerParams to be more compact and use its own wrap mode enum.
The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic.

Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3
Reviewed-on: https://skia-review.googlesource.com/43200
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-09-07 16:58:31 +00:00
Brian Osman
195c05b6d5 Move several GrContextOptions fields behind GR_TEST_UTILS
Bug: skia:
Change-Id: I35bc08ad72fb94d8e47fe342d314c4496b954226
Reviewed-on: https://skia-review.googlesource.com/40881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-30 19:35:27 +00:00
Robert Phillips
ad8a43f769 DeferredDisplayList API proposal
Chrome would like to perform cpu-side preprocessing for gpu draws in parallel. 
They do not want to go through a picture (since they have their own display list format).


The general idea is that we add a new SkDeferredDisplayListRecorder class to
perform all of Ganesh's cpu-side preprocessing ahead of time and in parallel.

The SkDDLRecorder operates like SkPictureRecorder. The user can get an SkCanvas
from the SkDDLRecorder and feed it draw operations. Once finished, the user
calls 'detach' to get an SkDeferredDisplayList. All the work up to and 
including the 'detach' call can be done in parallel and will not touch
the GPU. To actually get pixels the client must call SkSurface::draw(SkDDL)
on an SkSurface that is "compatible" with the surface characterization
initially given to the SkDDLMaker.

The surface characterization contains the minimum amount of information Ganesh needs 
to know about the ultimate destination in order to perform its cpu-side work
(i.e., caps, width, height, config).



Change-Id: I75faa483ab5a6b779c8de56ea56b9d90b990f43a
Reviewed-on: https://skia-review.googlesource.com/30140
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-30 19:25:47 +00:00
Robert Phillips
6b47c7d19f Store discard request on the opList and remove GrDiscardOp (take 3)
Change-Id: Ided58e0110b0b4e611ab65f46c18a6ae2b85f1bc
Reviewed-on: https://skia-review.googlesource.com/39340
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-29 11:43:01 +00:00
Ben Wagner
a93a14a998 Convert NULL and 0 to nullptr.
This was created by looking at warnings produced by clang's
-Wzero-as-null-pointer-constant. This updates most issues in
Skia code. However, there are places where GL and Vulkan want
pointer values which are explicitly 0, external headers which
use NULL directly, and possibly more uses in un-compiled
sources (for other platforms).

Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345
Reviewed-on: https://skia-review.googlesource.com/39521
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-28 17:48:57 +00:00
Robert Phillips
445b557361 Revert "Store discard request on the opList and remove GrDiscardOp (take 2)"
This reverts commit 9b0b32fda4.

Reason for revert: Android_Vulkan Gold images are broken

Original change's description:
> Store discard request on the opList and remove GrDiscardOp (take 2)
> 
> Change-Id: I2f1bd6f8547895cc8d66cfde42d7d890441d198e
> Reviewed-on: https://skia-review.googlesource.com/33460
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I1470d88c2407864da8b6ebdc119c8c2466a2a6c6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/39000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-25 20:36:39 +00:00
Robert Phillips
9b0b32fda4 Store discard request on the opList and remove GrDiscardOp (take 2)
Change-Id: I2f1bd6f8547895cc8d66cfde42d7d890441d198e
Reviewed-on: https://skia-review.googlesource.com/33460
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-25 18:52:18 +00:00
Robert Phillips
8296e752fa Switch atlas clients over to using absolute texture coordinates (take 2)
This is a prerequisite for being able to resize the atlas with impunity.

Change-Id: Iccc9c7ced43f38a7d8483a7bd12a458d59a3453a
Reviewed-on: https://skia-review.googlesource.com/38362
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-25 15:19:27 +00:00
Ben Wagner
59c7a6e6e2 Make SkTFitsIn turn into less code.
This changes the cases which require two compares into single compares
by relying on squirrely bits of the C++ specification.

Change-Id: I2c14e461b571bb94f586c14db4eaeadfd06b628b
Reviewed-on: https://skia-review.googlesource.com/38220
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-08-24 21:29:47 +00:00
Robert Phillips
e253831ee0 Revert "Switch atlas clients over to using absolute texture coordinates"
This reverts commit e84c087e62.

Reason for revert: ANGLE is unhappy

Original change's description:
> Switch atlas clients over to using absolute texture coordinates
> 
> This is a prerequisite for being able to resize the atlas with impunity.
> 
> Change-Id: I509816c8d6f38fbc92fa39aeab303b42ab09f58b
> Reviewed-on: https://skia-review.googlesource.com/37560
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I329efd642c22e11a5c576a4632fc557759b200d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/38400
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-24 17:56:30 +00:00
Robert Phillips
e84c087e62 Switch atlas clients over to using absolute texture coordinates
This is a prerequisite for being able to resize the atlas with impunity.

Change-Id: I509816c8d6f38fbc92fa39aeab303b42ab09f58b
Reviewed-on: https://skia-review.googlesource.com/37560
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-24 16:09:16 +00:00
Ben Wagner
7ca9a74fef Remove uses of sk_throw.
The sk_throw macro is now an alias to SK_ABORT, but is often used when
other macros better describe the situation. This change replaces
sk_throw with SK_ABORT or SkASSERT_RELEASE as appropriate.

Change-Id: I313facc6d535c8e8bec90ceeaf17ae3a381c48f3
Reviewed-on: https://skia-review.googlesource.com/35882
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-17 19:45:01 +00:00
Brian Salomon
1d816b92bb Revert "Switched highp float to highfloat and mediump float to half."
This reverts commit 88d99c6387.

Reason for revert: Believed to be causing unit test failures in Chrome roll:

https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/364433
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.android%2Flinux_android_rel_ng%2F364433%2F%2B%2Frecipes%2Fsteps%2Fcontent_browsertests__with_patch__on_Android%2F0%2Flogs%2FWebRtcCaptureFromElementBrowserTest.VerifyCanvasWebGLCaptureColor%2F0

Original change's description:
> Switched highp float to highfloat and mediump float to half.
> 
> The ultimate goal is to end up with "float" and "half", but this
> intermediate step uses "highfloat" so that it is clear if I missed a
> "float" somewhere. Once this lands, a subsequent CL will switch all
> "highfloats" back to "floats".
> 
> Bug: skia:
> Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca
> Reviewed-on: https://skia-review.googlesource.com/31000
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I8bfa97547ac3920d433665f161d27df3f15c83aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/35705
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-17 15:08:17 +00:00
Ben Wagner
824e730789 Remove SkFAIL.
This macro just forwards to SK_ABORT. It appears there are now no users.

Change-Id: I25a736790d7799b8ff51d879a823ee1b6b9cb47e
Reviewed-on: https://skia-review.googlesource.com/35760
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-17 13:42:06 +00:00
Ethan Nicholas
88d99c6387 Switched highp float to highfloat and mediump float to half.
The ultimate goal is to end up with "float" and "half", but this
intermediate step uses "highfloat" so that it is clear if I missed a
"float" somewhere. Once this lands, a subsequent CL will switch all
"highfloats" back to "floats".

Bug: skia:
Change-Id: Ia13225c7a0a0a2901e07665891c473d2500ddcca
Reviewed-on: https://skia-review.googlesource.com/31000
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-16 23:05:15 +00:00
Brian Salomon
cf75b00ff0 Make ref manipulation public on surface proxies.
Now that our system supports more flexible and later creation of GrPiplines, GrOps should be able to access these methods without the redundant state variables incurred when using GrGpuResourceRef.

Change-Id: Ib9c025e1134617f96b9ebbb153c78e51c63914bf
Reviewed-on: https://skia-review.googlesource.com/35283
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-16 15:42:58 +00:00
Ben Wagner
b4aab9ae6d Replace SkFAIL with SK_ABORT.
SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically
changes uses of SkFAIL to SK_ABORT in preparation for its removal. The
related sk_throw macro will be changed independently, due to needing to
actually clean up its users.

Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb
Reviewed-on: https://skia-review.googlesource.com/35284
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-16 15:37:54 +00:00
Brian Osman
03776fc0d7 Speed up convexpaths GM in debug builds
That GM has a path with 16k points, arranged in a rectangle. When we try
to draw it in Ganesh, we first check to see if it's a (closed) rectangle.
We eventually decide that it is a rectangle, but not closed, so it gets
passed along. Then we construct a GrShape, which tries to simplify the
shape, again asking if it's a rectangle...

Each isRect query was iterating over the 16k verbs, and for each one,
calling atVerb(i). That, internally, calls verbs(), which calls validate()
in debug builds. So we were walking all 16k points 16k times (to ensure
the bounds were correct). The end result is that the GM took over 11
seconds to draw, and now takes 3 ms.

Bug: skia:
Change-Id: If5f7a067b8c25f049dc64275d94a42ae4a50f6a9
Reviewed-on: https://skia-review.googlesource.com/34723
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-15 20:29:07 +00:00
Brian Salomon
aff329b8e9 Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008
Reviewed-on: https://skia-review.googlesource.com/32760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-08-11 14:13:26 +00:00
Adrienne Walker
ad8da8ea99 Expose SkPath validation as boolean
As a part of serializing SkPaths, I want to be able to know (without
asserting) whether or not a path is valid so that I can discard
potentially malicious deserialized paths.

Currently, SkPath(Ref) both just have asserting validation functions
which can't be used externally.  This patch adds accessors that don't
assert.

Bug: chromium:752755 skia:6955
Change-Id: I4d0ceb31ec660b87e3fda438392ad2b60a27a0da
Reviewed-on: https://skia-review.googlesource.com/31720
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-08-10 20:22:35 +00:00
Robert Phillips
65048139bd Remove accessRenderTarget calls in service of binding stencil buffer
Change-Id: Ifca6e21c619a0433ecf0b8699d92661f8c3068a8
Reviewed-on: https://skia-review.googlesource.com/31243
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-10 12:47:25 +00:00
Robert Phillips
54190c42dd Revert "Store discard request on the opList and remove GrDiscardOp"
This reverts commit b681a0f1b0.

Reason for revert: Seems to be messing up some MacMini & Nexus7 bots
Original change's description:
> Store discard request on the opList and remove GrDiscardOp
> 
> Change-Id: Ic1f76bb91c16b23df1fe71c07a4d5ad5abf1dc26
> Reviewed-on: https://skia-review.googlesource.com/32640
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I8a89fae7bb11791bd023d7444a074bb34d006fd0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/32704
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-09 20:10:06 +00:00
Robert Phillips
b681a0f1b0 Store discard request on the opList and remove GrDiscardOp
Change-Id: Ic1f76bb91c16b23df1fe71c07a4d5ad5abf1dc26
Reviewed-on: https://skia-review.googlesource.com/32640
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-09 18:11:34 +00:00
Mike Reed
828f1d5195 handle overflows in float->int
rects are already auto-vectorized, so no need to explicitly write a 4f version of SkRect::round()

Bug: skia:
Change-Id: I098945767bfcaa7093d770c376bd17ff3bdc9983
Reviewed-on: https://skia-review.googlesource.com/32060
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-08-09 16:07:24 +00:00
Mike Reed
35ee0e09b4 clean up useage of SkFloatBits
Bug: skia:
Change-Id: I6d3a0019f2fcf11feca69123e4ce6eb35de43613
Reviewed-on: https://skia-review.googlesource.com/31222
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-08-07 02:49:29 +00:00
Mike Reed
8addae8b53 just use math.h for converting from float to int
Bug: skia:
Change-Id: I40cce503cd4cef09c671511a705192efc5d67d71
Reviewed-on: https://skia-review.googlesource.com/31002
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-08-04 21:25:07 +00:00
Mike Reed
514ac0b92a remove unused flag
Bug: skia:
Change-Id: Icfaf04a541138700da906d96dfc2d90e4e00379d
Reviewed-on: https://skia-review.googlesource.com/31150
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-08-04 18:20:45 +00:00
Ben Wagner
ac32662d12 Clean up SkPathRef::makeSpace.
Note that this does not clean up the users of this function, which
may themselves be subject to other overflow issues.

BUG=chromium:728936

Change-Id: I3eaa7627c3b6ff49296ea2618a0157dacdc1d9cc
Reviewed-on: https://skia-review.googlesource.com/29121
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-07-31 22:42:24 +00:00
Ethan Nicholas
5af9ea399d renamed SkSL types in preparation for killing precision modifiers
Bug: skia:
Change-Id: Iff0289e25355a89cdc289a0892ed755dd1b1c900
Reviewed-on: https://skia-review.googlesource.com/27703
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-28 20:43:03 +00:00
Robert Phillips
066f020bb6 Reduce dependence on GrSurface's origin field (take 3)
TBR=bsalomon@google.com

Change-Id: I8c95c6774897dbd87e3c5c87d92f75c5b64d4e76
Reviewed-on: https://skia-review.googlesource.com/26424
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-07-25 17:34:29 +00:00
Robert Phillips
6af2a668f4 Revert "Reduce dependence on GrSurface's origin field (take 2)"
This reverts commit 22115b4fc6.

Reason for revert: GrAHardwareBufferImageGenerator.cpp

Original change's description:
> Reduce dependence on GrSurface's origin field (take 2)
> 
> TBR=bsalomon@google.com
> Change-Id: Ia238fc66b0fe10a3626c7967b2ac1f1a4bf4cd71
> Reviewed-on: https://skia-review.googlesource.com/25800
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I6dc77f02eed3073317128c48f0b426b81926787f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/26480
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-25 14:11:45 +00:00
Robert Phillips
22115b4fc6 Reduce dependence on GrSurface's origin field (take 2)
TBR=bsalomon@google.com
Change-Id: Ia238fc66b0fe10a3626c7967b2ac1f1a4bf4cd71
Reviewed-on: https://skia-review.googlesource.com/25800
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-25 14:00:43 +00:00
Robert Phillips
57aa367aa3 Add initial version of GrResourceAllocator's free pool (take 2)
TBR=bsalomon@google.com
Change-Id: I252d0d75f9ad3911abf97495f67d5178e924dd78
Reviewed-on: https://skia-review.googlesource.com/25560
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-21 16:18:53 +00:00
Robert Phillips
96be9df130 Revert "Reduce dependence on GrSurface's origin field"
This reverts commit 467022b186.

Reason for revert: GrAHardwareBufferImageGenerator.cpp

Original change's description:
> Reduce dependence on GrSurface's origin field
> 
> Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.
> 
> Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
> Reviewed-on: https://skia-review.googlesource.com/24700
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I1b3f5c3b82d250ac164beb1d5c83abb6c3c6ab3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/25620
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-21 14:17:54 +00:00
Robert Phillips
467022b186 Reduce dependence on GrSurface's origin field
Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.

Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
Reviewed-on: https://skia-review.googlesource.com/24700
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-21 14:05:33 +00:00
Robert Phillips
39f1a9589b Revert "Add initial version of GrResourceAllocator's free pool"
This reverts commit 6ec9a4ffe4.

Reason for revert: Maybe breaking iOS bots

Original change's description:
> Add initial version of GrResourceAllocator's free pool
> 
> Change-Id: Ibd60303ffb1d3ea814dad0cee3a521f94da63ca8
> Reviewed-on: https://skia-review.googlesource.com/24262
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I0195f64503a6f2f7b416f75b57fb9141e5b9f796
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/25540
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-21 12:15:14 +00:00
Robert Phillips
6ec9a4ffe4 Add initial version of GrResourceAllocator's free pool
Change-Id: Ibd60303ffb1d3ea814dad0cee3a521f94da63ca8
Reviewed-on: https://skia-review.googlesource.com/24262
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-21 11:37:23 +00:00
Brian Salomon
c5886036cb Move GrTypesPriv.h to include/private
Bug: skia:
Change-Id: I68610fed67a70454a815229c47b78ea6d9463a43
Reviewed-on: https://skia-review.googlesource.com/24624
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-19 17:16:14 +00:00
Robert Phillips
5af44defbd Add GrResourceAllocator class + unit test
Change-Id: I2700e8cb4213479b680519ba67f078cc3fb71376
Reviewed-on: https://skia-review.googlesource.com/23661
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-19 11:43:54 +00:00
Robert Phillips
590533f066 Plumb raw GrMipLevel* down instead of SkTArray<GrMipLevel> in GrGpu
Change-Id: I34033b6ecb469458eb820cbc01aad8c7bb876312
Reviewed-on: https://skia-review.googlesource.com/22212
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-12 11:40:15 +00:00
Robert Phillips
8e8c755f56 Move GrResourceProvider::createMipMappedTexture to GrSurfaceProxy::MakeDeferredMipMap
Although this adds a new method to GrResourceProvider, it is a slight improvement in that it removes some GrProxy stuff from GrResourceProvider (which arguably should only deal in GrSurface-derived classes).

Bug: skia:
Change-Id: I6d097ed178cd2aa5662770a164135bf2553b80e6
Reviewed-on: https://skia-review.googlesource.com/22023
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-11 13:23:41 +00:00
Brian Salomon
8fe24272fa Add mock config to tools and run through gms and benchs without crashing.
Change-Id: I7e2474129ef2b15899ad2baeb8d18f39d05da98c
Reviewed-on: https://skia-review.googlesource.com/21820
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-07 20:47:38 +00:00