Commit Graph

1294 Commits

Author SHA1 Message Date
senorblanco
59cd36765c Revert of Implement caching of stroked paths in the tessellated path renderer. (patchset #4 id:60001 of https://codereview.chromium.org/1275553002/ )
Reason for revert:
Breaking/asserting in Debug on DM.

Original issue's description:
> Implement caching of stroked paths in the tessellated path renderer.
>
> This requires adding the stroke info to the cache key, and doing the
> stroking and dashing before rendering as triangles.
>
> BUG=skia:3755
>
> Committed: https://skia.googlesource.com/skia/+/29e0d3f267a03546f236023347cdb4595ece2fd1

TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3755

Review URL: https://codereview.chromium.org/1276633002
2015-08-05 13:37:49 -07:00
senorblanco
29e0d3f267 Implement caching of stroked paths in the tessellated path renderer.
This requires adding the stroke info to the cache key, and doing the
stroking and dashing before rendering as triangles.

BUG=skia:3755

Review URL: https://codereview.chromium.org/1275553002
2015-08-05 13:18:03 -07:00
joshualitt
2fe7923f7e Expose coord transforms from GrPipeline
BUG=skia:

Review URL: https://codereview.chromium.org/1275603002
2015-08-05 12:02:27 -07:00
joshualitt
847029043e fix for GrFragmentProcessor isEqual in GrPipeline
BUG=skia:

Review URL: https://codereview.chromium.org/1273693003
2015-08-05 09:30:02 -07:00
senorblanco
84cd621670 Implement caching of filled paths in the tessellated path renderer.
Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached.

Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold.

In order to invalidate the cache when an SkPath is changed or deleted,
this required implementing genID change notification in SkPath. This is
modelled almost exactly on SkPixelRef::GenIDChangeListener.
However, It does not currently implement the check for unique genIDs,
so notifiers will fire when the first instance of an SkPathRef
using a given genID is destroyed.

Another caveat is that you cannot successfully add a change notifier
to an empty path, since it uses the "canonical" empty path which is
never modified or destroyed. For this reason, we prevent adding
listeners to it.

BUG=skia:4121,skia:4122, 497403
DOCS_PREVIEW= https://skia.org/?cl=1114353004

Committed: https://skia.googlesource.com/skia/+/468dfa72eb6694145487be17876804dfca3b7adb

Review URL: https://codereview.chromium.org/1114353004
2015-08-04 10:01:58 -07:00
mtklein
562a66b093 Revert "Implement caching of filled paths in the tessellated path renderer."
This reverts commit 468dfa72eb.

    This CL caused signficant GM diffs.

Revert "Fix resource cache test."
This reverts commit b001c41ed3.
Revert "Fix SkData leaks at GrResourceKey::setCustomData() call sites."
This reverts commit c369348aa5.

    These CLs depend on the first one.

BUG=skia:
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1260363007
2015-08-04 08:46:16 -07:00
wangyix
4b3050b410 Added registerChild; transforms, textures, glKey automatically handled.
BUG=skia:

Review URL: https://codereview.chromium.org/1266633003
2015-08-04 07:59:37 -07:00
senorblanco
468dfa72eb Implement caching of filled paths in the tessellated path renderer.
Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached.

Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold.

In order to invalidate the cache when an SkPath is changed or deleted,
this required implementing genID change notification in SkPath. This is
modelled almost exactly on SkPixelRef::GenIDChangeListener.
However, It does not currently implement the check for unique genIDs,
so notifiers will fire when the first instance of an SkPathRef
using a given genID is destroyed.

Another caveat is that you cannot successfully add a change notifier
to an empty path, since it uses the "canonical" empty path which is
never modified or destroyed. For this reason, we prevent adding
listeners to it.

BUG=skia:4121,skia:4122, 497403
DOCS_PREVIEW= https://skia.org/?cl=1114353004

Review URL: https://codereview.chromium.org/1114353004
2015-08-03 13:04:03 -07:00
joshualitt
17d833b05b Add abliity to set textblob cache budget to GrContext
BUG=skia:

Review URL: https://codereview.chromium.org/1264283002
2015-08-03 10:17:44 -07:00
bsalomon
eae6200acb Some cleanup in GrTextureProvider and GrResourceProvider.
Review URL: https://codereview.chromium.org/1261643004
2015-07-31 13:59:31 -07:00
bsalomon
88c7b988ba Make ANGLE perf decisions be runtime rather than compile time
R=robertphillips@google.com

Review URL: https://codereview.chromium.org/1268953002
2015-07-31 11:20:16 -07:00
bsalomon
16921ec30a SRGB read and write pixels working and unit test
Review URL: https://codereview.chromium.org/1264003002
2015-07-30 15:34:56 -07:00
mtklein
22355c4f40 Move headers with no dependencies.
C.f.  https://codereview.chromium.org/1261013003/

BUG=skia:4126

Will follow up with two more CLs if this works:
  - one moving SkRecords.h
  - one moving SkMiniRecorder.h

No public API changes.
TBR=reed@google.com

Committed: https://skia.googlesource.com/skia/+/117842223bd13325b6da26110d80e0590c1a742b

Review URL: https://codereview.chromium.org/1266593002
2015-07-29 11:10:46 -07:00
Mike Klein
1e8a58b568 Revert "Move headers with no dependencies."
This reverts commit 117842223b.

No good:
https://uberchromegw.corp.google.com/i/client.skia/builders/Mac%20Builder/builds/3465/steps/compile/logs/stdio

BUG=skia:4126

Review URL: https://codereview.chromium.org/1262173002 .
2015-07-29 11:50:09 -04:00
mtklein
117842223b Move headers with no dependencies.
C.f.  https://codereview.chromium.org/1261013003/

BUG=skia:4126

Will follow up with two more CLs if this works:
  - one moving SkRecords.h
  - one moving SkMiniRecorder.h

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1266593002
2015-07-29 08:18:34 -07:00
bsalomon
636e8024f8 Skip temp texture when config conversion test has already failed.
Review URL: https://codereview.chromium.org/1261033005
2015-07-29 06:08:46 -07:00
Mike Klein
3a4b134988 Revert "Move the rest of src headers used by include to include/private."
This reverts commit d12e6ffa5c.

Our Chrome roll canaries are failing with the dreaded
Ninja-says-there's-more-work-to-do message.  I will break this up
smaller (if possible) and try again tomorrow.

BUG=skia:4126

Review URL: https://codereview.chromium.org/1258293004 .
2015-07-28 16:01:24 -04:00
mtklein
d12e6ffa5c Move the rest of src headers used by include to include/private.
$ git grep "../../src/" | grep include

now returns nothing.

BUG=skia:4126

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1261013003
2015-07-28 11:51:50 -07:00
wangyix
570e7a34da Removed GrFragmentProcessor::fWillUseInputColor
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1259303003
2015-07-28 11:47:44 -07:00
mtklein
fd8ed69447 Move SkTHash.h to include/private.
include/views/SkOSWindow_Win.h includes it.

To move SkTHash.h to include/private, SkChecksum.h needs to go there too.  To move SkChecksum.h to include/private, SkTLogic needs to go there too.

This adds a bunch of -Iinclude/private to tools.gyp I missed in the last CL.

No public API changes.
TBR=reed@google.com

BUG=skia:4126

Review URL: https://codereview.chromium.org/1260613006
2015-07-28 09:54:52 -07:00
bsalomon
e8d21e8f24 Make readpixels work on GrTextures
Review URL: https://codereview.chromium.org/1234313002
2015-07-16 08:23:13 -07:00
joshualitt
3df1e2163f Another trivial cleanup
TBR=bsalomon@google.com
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/52e7657cd850f95e66eb23c6d138ee45149a1039

Review URL: https://codereview.chromium.org/1229303003
2015-07-14 11:02:46 -07:00
kkinnunen
6bb6d4075b Implement support for CHROMIUM_path_rendering pseudo extension
Implement support for path rendering in Chromium through
CHROMIUM_path_rendering pseudo extension.

The extension defines a new pseudo-gl function,
BindFragmentInputLocation. This behaves similarly to the
BindUniformLocation pseudo-gl function. The idea is to assign fragment
input location to a fragment input before linking the program.

BUG=chromium:344330

Committed: https://skia.googlesource.com/skia/+/eeef46d181f9f8db388ecea81df699fc1b3c9280

Review URL: https://codereview.chromium.org/1192663002
2015-07-14 10:59:23 -07:00
joshualitt
6968428f44 Revert of Another trivial cleanup (patchset #6 id:100001 of https://codereview.chromium.org/1229303003/)
Reason for revert:
breaking things

Original issue's description:
> Another trivial cleanup
>
> TBR=bsalomon@google.com
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/52e7657cd850f95e66eb23c6d138ee45149a1039

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

Review URL: https://codereview.chromium.org/1233853004
2015-07-13 13:29:13 -07:00
joshualitt
52e7657cd8 Another trivial cleanup
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1229303003
2015-07-13 13:11:40 -07:00
joshualitt
5e6ba21f07 Modify GrClipMaskManager to reflect logical constness
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1230023003
2015-07-13 07:35:05 -07:00
joshualitt
5b4f05f709 Move GrProcessorDataManager to GrMemoryPool
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1225363002
2015-07-10 07:26:21 -07:00
joshualitt
7b670db2b4 Remove setFromPaint from GrPipelineBuilder
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1227153003
2015-07-09 13:25:02 -07:00
joshualitt
5f10b5c1b5 More threading of GrProcessorDataManager
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1230813003
2015-07-09 10:24:36 -07:00
joshualitt
9cc1775e72 rename GrShaderDataManager -> GrProcessorDataManager
BUG=skia:

Review URL: https://codereview.chromium.org/1228683002
2015-07-09 06:28:14 -07:00
joshualitt
0067ff5e0f fix up test create functions
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1213623022
2015-07-08 14:26:19 -07:00
joshualitt
81793410a8 add ability to get FBO ID to Surface
BUG=skia:

Review URL: https://codereview.chromium.org/1220733007
2015-07-08 12:54:04 -07:00
bsalomon
7765a477ee Makes GrPipelineInfo a class with query functions used by GrBatch subclasses.
Committed: https://skia.googlesource.com/skia/+/f5179a4c490bc787190321bd8ffdb0e6a4efa9ac

Review URL: https://codereview.chromium.org/1213383005
2015-07-08 11:26:37 -07:00
bsalomon
d07a2793ba Revert of Rework GrPipelineInfo (patchset #7 id:120001 of https://codereview.chromium.org/1213383005/)
Reason for revert:
breaking stuff!

Original issue's description:
> Makes GrPipelineInfo a class with query functions used by GrBatch subclasses.
>
> Committed: https://skia.googlesource.com/skia/+/f5179a4c490bc787190321bd8ffdb0e6a4efa9ac

TBR=joshualitt@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1213013003
2015-07-08 10:20:21 -07:00
joshualitt
b2456053c7 more threading of GrShaderDataManager
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1215643006
2015-07-08 09:36:59 -07:00
bsalomon
f5179a4c49 Makes GrPipelineInfo a class with query functions used by GrBatch subclasses.
Review URL: https://codereview.chromium.org/1213383005
2015-07-08 07:55:59 -07:00
bsalomon
cc97ece058 Add SK_API to GrSurface
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/1209043012
2015-07-08 07:53:10 -07:00
joshualitt
8ca93e7c73 Initial CL to create dummy GrShaderDataManager and thread it through
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1225673007
2015-07-08 06:51:43 -07:00
robertphillips
31dc1b2db0 style nit cleanups. e.g. remove 'virtual' on override declarations
Review URL: https://codereview.chromium.org/1216433005
2015-07-07 10:05:18 -07:00
jvanverth
2853fe409e Revert of Implement support for CHROMIUM_path_rendering pseudo extension (patchset #4 id:60001 of https://codereview.chromium.org/1192663002/)
Reason for revert:
DEPS roll failing

Original issue's description:
> Implement support for CHROMIUM_path_rendering pseudo extension
>
> Implement support for path rendering in Chromium through
> CHROMIUM_path_rendering pseudo extension.
>
> The extension defines a new pseudo-gl function,
> BindFragmentInputLocation. This behaves similarly to the
> BindUniformLocation pseudo-gl function. The idea is to assign fragment
> input location to a fragment input before linking the program.
>
> BUG=chromium:344330
>
> Committed: https://skia.googlesource.com/skia/+/eeef46d181f9f8db388ecea81df699fc1b3c9280

TBR=bsalomon@google.com,joshualitt@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:344330

Review URL: https://codereview.chromium.org/1223673002
2015-07-02 12:53:27 -07:00
kkinnunen
eeef46d181 Implement support for CHROMIUM_path_rendering pseudo extension
Implement support for path rendering in Chromium through
CHROMIUM_path_rendering pseudo extension.

The extension defines a new pseudo-gl function,
BindFragmentInputLocation. This behaves similarly to the
BindUniformLocation pseudo-gl function. The idea is to assign fragment
input location to a fragment input before linking the program.

BUG=chromium:344330

Review URL: https://codereview.chromium.org/1192663002
2015-07-02 03:01:43 -07:00
Mike Klein
478c9e4851 Revert "Move headers used by headers in include/ to include/private."
This reverts commit 928e16565f.

BUG=skia:

Review URL: https://codereview.chromium.org/1213093004.
2015-07-01 16:35:59 -04:00
mtklein
928e16565f Move headers used by headers in include/ to include/private.
Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h
used by (public) SkPictureRecorder.h.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/a89f55198bdc58f0b6f6196907ab25a6afc1a661

Review URL: https://codereview.chromium.org/1217293004
2015-07-01 11:55:42 -07:00
jvanverth
4417c7f8bb Revert "Move headers used by headers in include/ to include/private."
This reverts commit a89f55198b.

Reason: breaking the roll.

TBR=mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1216033008
2015-07-01 09:45:46 -07:00
mtklein
a89f55198b Move headers used by headers in include/ to include/private.
Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h
used by (public) SkPictureRecorder.h.

BUG=skia:

Review URL: https://codereview.chromium.org/1217293004
2015-07-01 08:41:15 -07:00
kkinnunen
cfe62e3084 Cleanup legacy NVPR-related definitions
Fixed-function NVPR codepaths were removed a while ago. Only NVPR API
version 1.3 (PathFragmentInputGen) was left working. Remove
backwards-compatibility code that was left behind.

Remove some NVPR API function typedefs that were left from initial
commits.

Remove PathCoords function pointer from GrGLInterface, it has
never been called and causes problems in the future, since it will
not be implemented in the Chromium pseudo extension.

Avoid failing interface creation even if nvprmsaaXX config is
requested but the driver is not recent enough. The SAN bots have
old driver, but try to run nvprmsaa16 configs. Instead, print
out a warning.

Committed: https://skia.googlesource.com/skia/+/fb8d6884e0e01d0c2f8596adf5af1efb0d08de7e

Committed: https://skia.googlesource.com/skia/+/e35b5d99d8dfcc6b2be844df28cba47436380809

Review URL: https://codereview.chromium.org/1177243004
2015-07-01 02:58:50 -07:00
bsalomon
c49e8682ab Rename flushForExternalRead->flushForExternalIO and always call in SkSurface::getTextureHandle
Review URL: https://codereview.chromium.org/1216243003
2015-06-30 11:37:35 -07:00
jvanverth
439f23e563 Revert of Cleanup legacy NVPR-related definitions (patchset #4 id:60001 of https://codereview.chromium.org/1177243004/)
Reason for revert:
Breaks the Ubuntu *SAN bots.

Original issue's description:
> Cleanup legacy NVPR-related definitions
>
> Fixed-function NVPR codepaths were removed a while ago. Only NVPR API
> version 1.3 (PathFragmentInputGen) was left working. Remove
> backwards-compatibility code that was left behind.
>
> Remove some NVPR API function typedefs that were left from initial
> commits.
>
> Remove PathCoords function pointer from GrGLInterface, it has
> never been called and causes problems in the future, since it will
> not be implemented in the Chromium pseudo extension.
>
> Committed: https://skia.googlesource.com/skia/+/fb8d6884e0e01d0c2f8596adf5af1efb0d08de7e
>
> Committed: https://skia.googlesource.com/skia/+/e35b5d99d8dfcc6b2be844df28cba47436380809

TBR=joshualitt@google.com,cdalton@nvidia.com,bsalomon@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1219663005
2015-06-30 09:40:38 -07:00
kkinnunen
e35b5d99d8 Cleanup legacy NVPR-related definitions
Fixed-function NVPR codepaths were removed a while ago. Only NVPR API
version 1.3 (PathFragmentInputGen) was left working. Remove
backwards-compatibility code that was left behind.

Remove some NVPR API function typedefs that were left from initial
commits.

Remove PathCoords function pointer from GrGLInterface, it has
never been called and causes problems in the future, since it will
not be implemented in the Chromium pseudo extension.

Committed: https://skia.googlesource.com/skia/+/fb8d6884e0e01d0c2f8596adf5af1efb0d08de7e

Review URL: https://codereview.chromium.org/1177243004
2015-06-30 03:59:50 -07:00
joshualitt
58001553ec add drawArraysInstanced to caps
BUG=skia:

Review URL: https://codereview.chromium.org/1202383006
2015-06-26 12:46:36 -07:00