Commit Graph

270 Commits

Author SHA1 Message Date
Brian Salomon
baaf439eb5 Revert "Revert "Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses.""
This reverts commit a0485d9452.

Bug: skia:
Change-Id: If50b2d1af285a6c3c943373bb7258b56e1af28d6
Reviewed-on: https://skia-review.googlesource.com/19961
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-15 16:49:40 +00:00
Brian Salomon
a0485d9452 Revert "Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses."
This reverts commit 1ec03f33cf.

Revert "Fix logic reversal in NonAAFillRectOp test factory"

This reverts commit 89c1c2552e.

Reason: Unexpected GM changes.

Bug: skia:
Change-Id: I9edf5f0e4a54b5cad86bd438a505aaaef38563de
Reviewed-on: https://skia-review.googlesource.com/19960
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-14 23:32:05 +00:00
Brian Salomon
1ec03f33cf Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses.
Consolidates op factory functions to a rewritten GrRectOpFactory.

Removes GrRenderTargetContext::drawNonAAFilledRect() in favor of creating and adding ops directly by the callers.

Change-Id: I57e5fc739bf4e92b4a4710c739e6d22cce82a479
Reviewed-on: https://skia-review.googlesource.com/17711
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-06-14 20:26:51 +00:00
Mike Reed
d20b5c489b use #ifdef instead of #if for SK_VULKAN
Try to fix android roll

Bug: skia:
Change-Id: Iae32027b299d8a975d3caf70f0f8910541ca972d
Reviewed-on: https://skia-review.googlesource.com/19800
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-14 10:23:07 +00:00
Robert Phillips
fcd5fddb02 Revert "Revert "Update skia to use ifdefs for Vulkan code instead of dummy header""
This reverts commit fad9e3f541.

Reason for revert: Can't find the error message anymore (?!?) Let's try again shall we

Original change's description:
> Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"
> 
> This reverts commit c0f8e426c5.
> 
> Reason for revert: Experiment to see if this will unblock the Android roll
> 
> Original change's description:
> > Update skia to use ifdefs for Vulkan code instead of dummy header
> > 
> > Bug: skia:6721
> > Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
> > Reviewed-on: https://skia-review.googlesource.com/19547
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com
> 
> Change-Id: Ib51c1672570f2071a17b6fbde692a5174b0358ce
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:6721
> Reviewed-on: https://skia-review.googlesource.com/19724
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Iecef7ddcfe31d82938336120a4193525ac6693be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6721
Reviewed-on: https://skia-review.googlesource.com/19782
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-14 01:43:38 +00:00
Robert Phillips
fad9e3f541 Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"
This reverts commit c0f8e426c5.

Reason for revert: Experiment to see if this will unblock the Android roll

Original change's description:
> Update skia to use ifdefs for Vulkan code instead of dummy header
> 
> Bug: skia:6721
> Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
> Reviewed-on: https://skia-review.googlesource.com/19547
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ib51c1672570f2071a17b6fbde692a5174b0358ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6721
Reviewed-on: https://skia-review.googlesource.com/19724
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-13 22:16:19 +00:00
Greg Daniel
c0f8e426c5 Update skia to use ifdefs for Vulkan code instead of dummy header
Bug: skia:6721
Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
Reviewed-on: https://skia-review.googlesource.com/19547
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-06-13 18:50:03 +00:00
Robert Phillips
646e4293f0 Retract GrTexture*.h & GrRenderTarget*.h from other headers
This does push some additional work (& includes) into the .cpp files.

Change-Id: I27c847e371802270d13594dcc22aae44039990bb
Reviewed-on: https://skia-review.googlesource.com/19660
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-13 17:21:41 +00:00
Robert Phillips
c4f0a8245c Move Flags from GrRenderTarget to GrTypesPriv.h & rename
The motivation for this is to prevent GrRenderTarget.h appearing in GrRenderTargetProxy.h

Change-Id: I4ef126972c0780cbacb35fa2aa6290777c66eddf
Reviewed-on: https://skia-review.googlesource.com/19521
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-13 13:12:17 +00:00
Robert Phillips
fee2b4ed0f Create a new HDC for each ANGLE context
Bug: skia:6711
Change-Id: I9c4720a8dbad4c6b18efe73e0e61afbdc19627bc
Reviewed-on: https://skia-review.googlesource.com/19090
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-09 00:39:00 +00:00
Robert Phillips
cdabbcc3b5 Store context type (rather than backend type) in ContextInfo
Change-Id: I7dbfb735f1f094fa0a025b84f69e06a3533f2815
Reviewed-on: https://skia-review.googlesource.com/19101
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-08 20:29:44 +00:00
Mike Klein
31550dbc98 Revert "Revert "Workaround Adreno driver issue with stencil clears.""
This reverts commit 8b06ed7c9f.

Reason for revert: try again.

Original change's description:
> Revert "Workaround Adreno driver issue with stencil clears."
> 
> This reverts commit 4e8c581f2a.
> 
> Reason for revert: breaks Google3 roll
> 
> Original change's description:
> > Workaround Adreno driver issue with stencil clears.
> > 
> > This also removes the "debug wire rect" which was not used and not implemented for Vulkan.
> > 
> > Also some declared but not implemented methods are removed from GrGLGpu.
> > 
> > Bug: skia:5587
> > 
> > Change-Id: I750051e90e6cfbfad6a6fe20792226182f698bcf
> > Reviewed-on: https://skia-review.googlesource.com/18639
> > Reviewed-by: Chris Dalton <csmartdalton@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,csmartdalton@google.com
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:5587
> 
> Change-Id: I65aa16b3f8c70cdef56ff16e16304ba09604c475
> Reviewed-on: https://skia-review.googlesource.com/18924
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,bsalomon@google.com,reviews@skia.org,csmartdalton@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:5587

Change-Id: Ice49027bda1c1ff7e0362d0680341ac862159850
Reviewed-on: https://skia-review.googlesource.com/18928
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-06 23:32:28 +00:00
Mike Klein
8b06ed7c9f Revert "Workaround Adreno driver issue with stencil clears."
This reverts commit 4e8c581f2a.

Reason for revert: breaks Google3 roll

Original change's description:
> Workaround Adreno driver issue with stencil clears.
> 
> This also removes the "debug wire rect" which was not used and not implemented for Vulkan.
> 
> Also some declared but not implemented methods are removed from GrGLGpu.
> 
> Bug: skia:5587
> 
> Change-Id: I750051e90e6cfbfad6a6fe20792226182f698bcf
> Reviewed-on: https://skia-review.googlesource.com/18639
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:5587

Change-Id: I65aa16b3f8c70cdef56ff16e16304ba09604c475
Reviewed-on: https://skia-review.googlesource.com/18924
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-06-06 22:12:48 +00:00
Brian Salomon
4e8c581f2a Workaround Adreno driver issue with stencil clears.
This also removes the "debug wire rect" which was not used and not implemented for Vulkan.

Also some declared but not implemented methods are removed from GrGLGpu.

Bug: skia:5587

Change-Id: I750051e90e6cfbfad6a6fe20792226182f698bcf
Reviewed-on: https://skia-review.googlesource.com/18639
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-06 19:36:31 +00:00
Robert Phillips
67d52cf0d8 sk_sp-ify GrResourceProvider some more
I believe this addresses the concerns of this particular bug (although more remains to be done)

Bug: skia:5327
Change-Id: Ie82f08f87b3cf3d7986fe4eeb16a5d2553173913
Reviewed-on: https://skia-review.googlesource.com/18599
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-05 18:07:05 +00:00
Robert Phillips
bab680d891 Revert "Destroy ANGLE displays in destroyGLContext"
This reverts commit c1359888c0.

Reason for revert: failing botbots

Original change's description:
> Destroy ANGLE displays in destroyGLContext
> 
> Bug: skia:6711
> Change-Id: I770bb390d7b4e156116411bc6ce796375a6ddf21
> Reviewed-on: https://skia-review.googlesource.com/18588
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6711

Change-Id: I2087153f1601dfade8442f0918ffd71e0cacff08
Reviewed-on: https://skia-review.googlesource.com/18621
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-05 17:39:32 +00:00
Robert Phillips
c1359888c0 Destroy ANGLE displays in destroyGLContext
Bug: skia:6711
Change-Id: I770bb390d7b4e156116411bc6ce796375a6ddf21
Reviewed-on: https://skia-review.googlesource.com/18588
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-05 16:39:05 +00:00
Kevin Lubick
ffce079f4e Enable chromecast gpu perf
The new #ifndef account for what the chromecast sdk
cannot handle (e.g. posix).

Bug: skia:6581
Change-Id: I3d64d25980d80185f8b95c05badee5f665d97cd3
Reviewed-on: https://skia-review.googlesource.com/13811
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2017-05-24 20:30:05 +00:00
Robert Phillips
92de631edd Remove compressed (ETC1) texture support from Ganesh (take 2)
Reland of https://skia-review.googlesource.com/c/17456/ (Remove compressed (ETC1) texture support from Ganesh) but w/o removing third_part\etc1 files

TBR=bsalomon@google.com
Change-Id: I8ec4b7e3ddf47d213cb24c382731c050ffb8847f
Reviewed-on: https://skia-review.googlesource.com/17700
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-05-23 12:45:21 +00:00
Brian Osman
bc262e110a Revert "Remove compressed (ETC1) texture support from Ganesh"
This reverts commit ee26363aaa.

Reason for revert: Failing Google 3 roll.

Original change's description:
> Remove compressed (ETC1) texture support from Ganesh
> 
> Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
> Reviewed-on: https://skia-review.googlesource.com/17456
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: Ie1a57187287e03600a69e374501478e93c41415c
Reviewed-on: https://skia-review.googlesource.com/17527
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-22 20:14:50 +00:00
Robert Phillips
ee26363aaa Remove compressed (ETC1) texture support from Ganesh
Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
Reviewed-on: https://skia-review.googlesource.com/17456
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-22 18:02:52 +00:00
Robert Phillips
b7b7e5fba0 Add fixes & test for isConfigTexturable and isConfigRenderable
This CL fixes:
  isConfigTexturable was returning true for:
            kRG_float for ANGLE ES2 configs
  isConfigRenderable was returning true for:
            kAlpha_8 for ANGLE ES2 configs
  isConfigTexturable and isConfigRenderable were returning true for:
            SBGRA on ES2
  The NexusPlayer was marking RGBA & RG float configs as renderable but not textureable

Bug: 720325

Change-Id: If21361870dbdde8f3e09bc9dff3a394f2a329157
Reviewed-on: https://skia-review.googlesource.com/17387
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-22 17:55:48 +00:00
Brian Salomon
154ce91dc9 Replace most uses of GrSurface::desc() with conifg(), width(), etc.
Change-Id: Ic283c0ddf9efa0a467e97e10f5413ba9dfcb414f
Reviewed-on: https://skia-review.googlesource.com/17211
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-17 18:56:50 +00:00
Brian Salomon
05441c40d6 Convert GrOvalOpFactory from GrLegacyMeshDrawOp to GrMeshDrawOp using GrSimpleDrawOpHelper.
Change-Id: Ib9f59ddf1c2c3f2bd0004ae16f842e52f45df8c9
Reviewed-on: https://skia-review.googlesource.com/16832
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-05-15 21:11:41 +00:00
Greg Daniel
604b197c6b Add support for creating a shared vulkan test context
Bug: skia:
Change-Id: I997c6269e4676bf4cedddcd87e71d107053678bb
Reviewed-on: https://skia-review.googlesource.com/16905
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-15 18:12:59 +00:00
Brian Salomon
177266339c Include non-legacy GrMeshDrawOps in GLPrograms test.
Bug: skia:
Change-Id: Ifa0c3ffb5643c84ccdcb339fae75ea5d03a8451c
Reviewed-on: https://skia-review.googlesource.com/16580
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-12 19:08:32 +00:00
Brian Salomon
ac70f84e7f Move all non-AA fill rect ops off of GrLegacyMeshDrawOp.
This adds perspective to GrNewNonAAFillRectOp, renames it to GrNonAAFillRectOp, and deletes the previous version of that namespace.

Change-Id: I20f35bf019f9c9105e6ec83dda11328451138109
Reviewed-on: https://skia-review.googlesource.com/15634
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-10 14:48:47 +00:00
Brian Osman
13dddce65f Added SkImage::MakeCrossContextFromEncoded
Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.

Re-land of https://skia-review.googlesource.com/c/14180/

Bug: skia:
Change-Id: I3dd382640629b79b3058f18fee68d043566e43e5
Reviewed-on: https://skia-review.googlesource.com/15895
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-09 18:45:04 +00:00
Eric Karl
5c77975e4c Add flag to avoid stencil buffers in Skia
Certain systems experience a leak in the GL driver associated with
stencil buffers. Attempts to avoid the leak (while still using stencil
buffers) dind't succeed. This patch adds a GrContextOption
fAvoidStencilBuffers. This disables certain path rendering modes, as
well as stencil based masking/clipping.

Bug: 713854
Change-Id: Ifa6c0f2bd5ee395547bda9165d6c79d197ae8b8b
Reviewed-on: https://skia-review.googlesource.com/15253
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-09 17:41:25 +00:00
Brian Salomon
449d78f5a8 Revert "Added SkImage::MakeCrossContextFromEncoded"
This reverts commit 83b1b3db36.

Reason for revert: unit test failing and asan leaks

Original change's description:
> Added SkImage::MakeCrossContextFromEncoded
> 
> Designed for Flutter's threading architecture, with
> an eye to being useful to other clients. Under the
> hood, uses a new image generator class to lazily wrap
> a texture for multiple GrContexts.
> 
> Bug: skia:
> Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
> Reviewed-on: https://skia-review.googlesource.com/14180
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: I1f0bf580aa0ea2d132e18b64ff610ddac9d073a7
Reviewed-on: https://skia-review.googlesource.com/15892
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-08 20:46:26 +00:00
Brian Osman
83b1b3db36 Added SkImage::MakeCrossContextFromEncoded
Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.

Bug: skia:
Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
Reviewed-on: https://skia-review.googlesource.com/14180
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-08 19:56:27 +00:00
Chris Dalton
fe199b7d51 Add postFlush call to GrOnFlushCallbackObject
Adds a new postFlush method and renames the class to
GrOnFlushCallbackObject. Also removes the ref counting in favor of
making the callback object a purely virtual interface. ref/unref on the
callback interface would conflict with existing ref/unref methods on the
subclass. It is now the caller’s responsibility to ensure the lifetime
of the callback is tied to that of the context.

Bug: skia:
Change-Id: I2fc1f98c700032e296a36f3a9a09c0753ab47aea
Reviewed-on: https://skia-review.googlesource.com/15463
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-05 15:53:36 +00:00
Greg Daniel
207282eb5a Make GrBackendTexture take Gr*Info refs in ctor, and copy them.
Bug: skia:
Change-Id: Ic05d3384fa07560fc18c52bb8ae03541a72515f7
Reviewed-on: https://skia-review.googlesource.com/14374
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-02 14:08:28 +00:00
Greg Daniel
bcf612b5d0 Revert "Revert "Plumb the use of GrBackendRenderTarget throughout Skia""
This reverts commit e3bd422faf.

Reason for revert: Pre-req changes have all landed in other projects at this point.

Original change's description:
> Revert "Plumb the use of GrBackendRenderTarget throughout Skia"
> 
> This reverts commit fdd77daedb.
> 
> Reason for revert: Apparently I have a few more build files to update before this can land.
> 
> Original change's description:
> > Plumb the use of GrBackendRenderTarget throughout Skia
> > 
> > Bug: skia:
> > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa
> > Reviewed-on: https://skia-review.googlesource.com/14148
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f
> Reviewed-on: https://skia-review.googlesource.com/14531
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

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

Change-Id: Ib7ab94aada8a7cb80fe38f24daf32f9208c5b169
Reviewed-on: https://skia-review.googlesource.com/14826
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-01 14:14:50 +00:00
Brian Osman
dc87c95382 Combine GPU flush with semaphore API
Bug: skia:
Change-Id: I5f388760d43b19755b2767d95d32065f6d0f926e
Reviewed-on: https://skia-review.googlesource.com/14646
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-04-28 18:25:37 +00:00
Greg Daniel
e3bd422faf Revert "Plumb the use of GrBackendRenderTarget throughout Skia"
This reverts commit fdd77daedb.

Reason for revert: Apparently I have a few more build files to update before this can land.

Original change's description:
> Plumb the use of GrBackendRenderTarget throughout Skia
> 
> Bug: skia:
> Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa
> Reviewed-on: https://skia-review.googlesource.com/14148
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

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

Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f
Reviewed-on: https://skia-review.googlesource.com/14531
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-27 18:48:19 +00:00
Greg Daniel
fdd77daedb Plumb the use of GrBackendRenderTarget throughout Skia
Bug: skia:
Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa
Reviewed-on: https://skia-review.googlesource.com/14148
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-27 18:15:38 +00:00
Greg Daniel
ec6ae52168 Use system Vulkan headers except when no building with vulkan support
We now will always use the system vulkan.h files whenever we are building
with vulkan. With non vulkan builds we use our checked in header to so
that we can get the needed symbols for compiling.

Bug: skia:
Change-Id: I352a3e007b33c575cefcfd6752db0b3b12b86a16
Reviewed-on: https://skia-review.googlesource.com/14270
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-25 18:30:37 +00:00
Brian Salomon
c1889823de Add new GrVkBackendContext::Create explicitly requiring vk proc getters
Also remove the feature of GrVkGpu that creates the instance/device if the client doesn't provide one.

Change-Id: Ie617313b6c684ed355333a475b80d0aae7e3a026
Reviewed-on: https://skia-review.googlesource.com/14261
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-04-24 21:29:44 +00:00
Brian Osman
80be240001 Enable fence sync support in ES3 test contexts
This (only?) affects ANGLE. Other ES platforms typically go through
EGLGLTestContext, which manually instantiates an EGLFenceSync.

In general, though, ES3 requires this API, so this is safe. Should give us
more accurate (and much less spammy) output from ES3 ANGLE performance
testing.

Bug: skia:
Change-Id: I10a608d21092aaffa4ab76e4b3d2f6e9c5cf09bb
Reviewed-on: https://skia-review.googlesource.com/14063
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-04-21 19:39:16 +00:00
Greg Daniel
7ef28f35a2 Revert "Revert "Plumb GrBackendTexture throughout skia.""
This reverts commit 7fa5c31c2c.

Reason for revert: Relanding this change now that other fixes have landed.

Original change's description:
> Revert "Plumb GrBackendTexture throughout skia."
> 
> This reverts commit 7da62b9059.
> 
> Reason for revert: fix android roll
> 
> Original change's description:
> > Plumb GrBackendTexture throughout skia.
> > 
> > Bug: skia:
> > Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875
> > Reviewed-on: https://skia-review.googlesource.com/13645
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > 
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89
> Reviewed-on: https://skia-review.googlesource.com/13773
> Reviewed-by: Stan Iliev <stani@google.com>
> Commit-Queue: Stan Iliev <stani@google.com>
> 

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

Change-Id: I92bc074e4fe37fa5c83186afadc472c03802e8f2
Reviewed-on: https://skia-review.googlesource.com/13975
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-20 17:17:43 +00:00
Greg Daniel
c819e66993 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reland of the reverted cl: https://skia-review.googlesource.com/13804

Bug: skia:
Change-Id: I9023e80e60d2f2ebbdc8e794ec46d6f5c5c7c917
Reviewed-on: https://skia-review.googlesource.com/13874
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-20 13:09:27 +00:00
Greg Daniel
5238f994bf Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit 3a3bc42b7d.

Reason for revert: still breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> This is a reupload of CL: https://skia-review.googlesource.com/13651
> 
> Bug: skia:
> Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
> Reviewed-on: https://skia-review.googlesource.com/13804
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

TBR=djsollen@google.com,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic595e32005761170156499cfb6efc1acfce96001
Reviewed-on: https://skia-review.googlesource.com/13806
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 14:44:47 +00:00
Greg Daniel
3a3bc42b7d Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reupload of CL: https://skia-review.googlesource.com/13651

Bug: skia:
Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
Reviewed-on: https://skia-review.googlesource.com/13804
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 13:58:52 +00:00
Greg Daniel
df07ddd1f0 Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit edbb7d8860.

Reason for revert: breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> Bug: skia:
> Change-Id: I674a253308596dc75bd23574984ae933923679f9
> Reviewed-on: https://skia-review.googlesource.com/13651
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,bsalomon@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I179647e6ae213b1b17a9c42ced5e98c6599b96c2
Reviewed-on: https://skia-review.googlesource.com/13774
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 01:22:52 +00:00
Stan Iliev
7fa5c31c2c Revert "Plumb GrBackendTexture throughout skia."
This reverts commit 7da62b9059.

Reason for revert: fix android roll

Original change's description:
> Plumb GrBackendTexture throughout skia.
> 
> Bug: skia:
> Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875
> Reviewed-on: https://skia-review.googlesource.com/13645
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

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

Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89
Reviewed-on: https://skia-review.googlesource.com/13773
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2017-04-19 00:23:50 +00:00
Greg Daniel
7da62b9059 Plumb GrBackendTexture throughout skia.
Bug: skia:
Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875
Reviewed-on: https://skia-review.googlesource.com/13645
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-04-18 21:55:10 +00:00
Greg Daniel
edbb7d8860 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

Bug: skia:
Change-Id: I674a253308596dc75bd23574984ae933923679f9
Reviewed-on: https://skia-review.googlesource.com/13651
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-18 19:35:22 +00:00
Chris Dalton
59163ba06c Access EGL_KHR_fence_sync via eglGetProcAddress
Bug: skia:6497
Change-Id: Icf04de6b1facc94e8c45085575cb45189c6c649c
Reviewed-on: https://skia-review.googlesource.com/13306
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-04-13 13:28:03 +00:00
Robert Phillips
a90aa2bfd4 consolidate read/writePixels in GrSurfaceContext
Change-Id: I118fcd49990597d4dfea92efd3f9d99e52fdbfab
Reviewed-on: https://skia-review.googlesource.com/11481
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-04-10 12:56:33 +00:00
Robert Phillips
bf25d433f4 Make GrCopySurfaceOp friendlier to GrSurfaceProxy (take 2)
Reland of: https://skia-review.googlesource.com/c/11325/ (Make GrCopySurfaceOp friendlier to GrSurfaceProxy)

Change-Id: Ibe7312cebe7793af5803353a1499fbe7874c558f
Reviewed-on: https://skia-review.googlesource.com/11780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-07 15:33:58 +00:00
Robert Phillips
9a121cc6ad Revert "Make GrCopySurfaceOp friendlier to GrSurfaceProxy"
This reverts commit d7cda9a6f0.

Reason for revert: Tegra3!!!!

Original change's description:
> Make GrCopySurfaceOp friendlier to GrSurfaceProxy
> 
> Change-Id: Iba8c068bd96ab154d466e485a9db31dd552138de
> Reviewed-on: https://skia-review.googlesource.com/11325
> 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: Idc31d469d94e6e2772ee5714987b3a05bb902d88
Reviewed-on: https://skia-review.googlesource.com/11580
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-06 21:17:26 +00:00
Robert Phillips
d7cda9a6f0 Make GrCopySurfaceOp friendlier to GrSurfaceProxy
Change-Id: Iba8c068bd96ab154d466e485a9db31dd552138de
Reviewed-on: https://skia-review.googlesource.com/11325
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-06 20:03:40 +00:00
Brian Salomon
e14bd80db0 Move GrPipelineBuilder into GrRenderTargetContext::addLegacyDrawOp
This makes the legacy code use GrProcessorSet::Analysis in the same manner as the non-GrLegacyMeshDrawOps which enables changes to how analysis works.

Change-Id: I8171e285ac8930beb3ac33cd3c4ee88f217b9e40
Reviewed-on: https://skia-review.googlesource.com/11205
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-04-04 19:46:18 +00:00
Eric Karl
744808823f Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
Crurently, when preparing a texture for blitFramebuffer, we ignore the
kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
copy from one src rect to a different dst rect.

This change updates initDescForDstCopy and setupDstTexture to allocate
larger textures if necessary and accomodate this flags requirements.

Bug: 658277
Change-Id: If4489ac3192dcf6f9996494c63821279721d0a12
Reviewed-on: https://skia-review.googlesource.com/11141
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-04 17:26:38 +00:00
Brian Salomon
d3ccb0a37f Move pipeline handling out of GrMeshDrawOp.
The monolithic GrPipeline is moved to a subclass GrLegacyDrawMeshOp.

The pipeline used to record a GrMesh draw in a GrMeshDrawOp must now be passed rather than implicitly using the op's pipeline.

Change-Id: I50d77e4dcc8d91a523fa7566ce43a9a291174706
Reviewed-on: https://skia-review.googlesource.com/11002
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-04-03 15:13:48 +00:00
Mike Klein
ec61785bbb Revert "Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup"
This reverts commit d58f040532.

Reason for revert: tests/BlendTest is failing on the Nexus Player:

https://chromium-swarm.appspot.com/task?id=353ffc638e202210
https://chromium-swarm.appspot.com/task?id=353ff5e35819ab10



Original change's description:
> Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
> 
> Crurently, when preparing a texture for blitFramebuffer, we ignore the
> kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
> copy from one src rect to a different dst rect.
> 
> This change updates initDescForDstCopy and setupDstTexture to allocate
> larger textures if necessary and accomodate this flags requirements.
> 
> Bug: 658277
> Change-Id: I9f45a03d4055e0ad87c01e1d826287695096e609
> Reviewed-on: https://skia-review.googlesource.com/10941
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: I0fd6ca95bbc342f21978783b0103073179017795
Reviewed-on: https://skia-review.googlesource.com/11016
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-01 01:54:05 +00:00
Eric Karl
d58f040532 Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
Crurently, when preparing a texture for blitFramebuffer, we ignore the
kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
copy from one src rect to a different dst rect.

This change updates initDescForDstCopy and setupDstTexture to allocate
larger textures if necessary and accomodate this flags requirements.

Bug: 658277
Change-Id: I9f45a03d4055e0ad87c01e1d826287695096e609
Reviewed-on: https://skia-review.googlesource.com/10941
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-01 01:22:45 +00:00
Brian Salomon
84eef5154b Revert "Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup"
This reverts commit e0ff6ab272.

Reason for revert: a bunch of bots failed.

Original change's description:
> Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
> 
> Crurently, when preparing a texture for blitFramebuffer, we ignore the
> kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
> copy from one src rect to a different dst rect.
> 
> This change updates initDescForDstCopy and setupDstTexture to allocate
> larger textures if necessary and accomodate this flags requirements.
> 
> Bug: 658277
> Change-Id: I500f10dba5700f5f7a7acad04bcdbc9ac9994835
> Reviewed-on: https://skia-review.googlesource.com/10247
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: I7fbd6c2652fe71c707d3120b035e0365fbc7fa66
Reviewed-on: https://skia-review.googlesource.com/10920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-31 12:08:24 +00:00
Eric Karl
e0ff6ab272 Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup
Crurently, when preparing a texture for blitFramebuffer, we ignore the
kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to
copy from one src rect to a different dst rect.

This change updates initDescForDstCopy and setupDstTexture to allocate
larger textures if necessary and accomodate this flags requirements.

Bug: 658277
Change-Id: I500f10dba5700f5f7a7acad04bcdbc9ac9994835
Reviewed-on: https://skia-review.googlesource.com/10247
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-31 02:13:05 +00:00
Mike Klein
b338484d23 quiet some annoying logging in unit tests
Noticed all these while adding some unit test support to ok.

Change-Id: Ie33b96da95840628657211cb28b2134fd314a48a
Reviewed-on: https://skia-review.googlesource.com/10202
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-27 19:16:59 +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
Brian Salomon
6405e71279 Remove gpu configs that don't have explicit API.
DOCS_PREVIEW= https://skia.org/?cl=9871

Change-Id: I510473cf91d8bee38d1e33424b1ae7b30dc86968
Reviewed-on: https://skia-review.googlesource.com/9871
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-20 13:31:49 +00:00
Brian Osman
0b791f57c4 Remove ownership aruments from render target wrap functions
We never adopt render targets (just borrow them).

BUG=skia:

Change-Id: Ie899b814a7a81339a8735bbd7ad9facc66e580d7
Reviewed-on: https://skia-review.googlesource.com/9525
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-10 15:41:38 +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
Brian Salomon
649a3411f9 Add a separate draw function to GrRenderTargetContext for GrMeshDrawOp derived classes.
The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work.


Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef
Reviewed-on: https://skia-review.googlesource.com/9481
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-09 19:26:13 +00:00
Brian Osman
3b65598bce Make SkGr.h private and remove unused functions
BUG=skia:

Change-Id: I6699d00c5412ed9d9bf14b032a08b06b1c766bce
Reviewed-on: https://skia-review.googlesource.com/9398
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-08 20:55:21 +00:00
Robert Phillips
c013892711 Add a unique ID to GrOpLists and return it from GrRenderTargetContext::addDrawOp
This is to support the preFlush callbacks

Change-Id: I8513ea08b6516681566eceafa789b2ee7925ebce
Reviewed-on: https://skia-review.googlesource.com/9199
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-08 17:33:41 +00:00
Brian Salomon
467921e5e6 Move GrDrawOp pipeline/clip processing to GrRenderTargetContext
This is currently done in GrOpList. However, it can trigger resource creation, which in turn can trigger a flush. In the future flushing may destroy the op list.

Change-Id: I21cb1e10060bf31c95431c0511fcfff637cd6498
Reviewed-on: https://skia-review.googlesource.com/9304
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-07 15:11:24 +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
Greg Daniel
6be3523885 Add support for Semaphores (gpu waiting on gpu) in Ganesh
BUG=skia:

Change-Id: I4324b65bc50a3dfd90372459899870d5f1952fdc
Reviewed-on: https://skia-review.googlesource.com/9120
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-03-02 01:14:01 +00:00
Robert Phillips
32f2818c9d Clean up/remove unused GrFragmentProcessor-derived ctors
This is the simple (i.e., non-TextureAdjuster) portion of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: I8f673ebe922e03c69473c18c166bcf818507c662
Reviewed-on: https://skia-review.googlesource.com/8997
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-02-28 22:07:05 +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
Brian Osman
2c2bc11aea Add GrExternalTextureData and SkCrossContextImageData
GrExternalTextureData is an API for exporting the backend-specific
information about a texture in a type-safe way, and without pointing
into the GrTexture. The new detachBackendTexture API lets us release
ownership of a texture to the client.

SkCrossContextImageData is the public API that lets clients upload
textures on one thread/GrContext, then safely transfer ownership to
another thread and GrContext for rendering.

Only GL is implemented/supported right now. Vulkan support requires
that we add thread-safe memory pools, or otherwise transfer the
actual memory block containing the texture to the new context.

Re-land of https://skia-review.googlesource.com/c/8529/

BUG=skia:

Change-Id: I48ebd57d1ea0cfd3a1db10c475f2903afb821966
Reviewed-on: https://skia-review.googlesource.com/8960
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-28 20:59:57 +00:00
Brian Osman
9eac2ea773 Fixes to shared context test API
Fixes a bug in Windows shared context creation, and makes the API
less fiddly.

BUG=skia:

Change-Id: Ia32b2e3b4816e0b8d7e9be92c22a182ca1393177
Reviewed-on: https://skia-review.googlesource.com/8965
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-27 02:29:24 +00:00
Brian Osman
aa1ab8905e Revert "Add GrExternalTextureData and SkCrossContextImageData"
This reverts commit 9ad1f92e2f.

Reason for revert: Breaking lots of bots

Original change's description:
> Add GrExternalTextureData and SkCrossContextImageData
> 
> GrExternalTextureData is an API for exporting the backend-specific
> information about a texture in a type-safe way, and without pointing
> into the GrTexture. The new detachBackendTexture API lets us release
> ownership of a texture to the client.
> 
> SkCrossContextImageData is the public API that lets clients upload
> textures on one thread/GrContext, then safely transfer ownership to
> another thread and GrContext for rendering.
> 
> Only GL is implemented/supported right now. Vulkan support requires
> that we add thread-safe memory pools, or otherwise transfer the
> actual memory block containing the texture to the new context.
> 
> BUG=skia:
> 
> Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
> Reviewed-on: https://skia-review.googlesource.com/8529
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: If27d1f4c3a169efb6533170f67a172664c0fe8ce
Reviewed-on: https://skia-review.googlesource.com/8955
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-24 17:28:03 +00:00
Brian Osman
9ad1f92e2f Add GrExternalTextureData and SkCrossContextImageData
GrExternalTextureData is an API for exporting the backend-specific
information about a texture in a type-safe way, and without pointing
into the GrTexture. The new detachBackendTexture API lets us release
ownership of a texture to the client.

SkCrossContextImageData is the public API that lets clients upload
textures on one thread/GrContext, then safely transfer ownership to
another thread and GrContext for rendering.

Only GL is implemented/supported right now. Vulkan support requires
that we add thread-safe memory pools, or otherwise transfer the
actual memory block containing the texture to the new context.

BUG=skia:

Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
Reviewed-on: https://skia-review.googlesource.com/8529
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-02-24 16:09:33 +00:00
csmartdalton
008b9d80ab Add the ability to enable/disable GPU path renderers
Adds a bitfield to GrContextOptions that masks out path renderers.
Adds commandline flags support to set this bitfield in tools apps.
Removes GrGLInterfaceRemoveNVPR since we can now accomplish the same
thing in the context options.

BUG=skia:

Change-Id: Icf2a4df36374b3ba2f69ebf0db56e8aedd6cf65f
Reviewed-on: https://skia-review.googlesource.com/8786
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-02-22 20:29:56 +00:00
Brian Osman
12ab69540f Fix Mesa compile
BUG=skia:

Change-Id: Id532233537d18e6185a83681188aa73527b212a1
Reviewed-on: https://skia-review.googlesource.com/8842
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-22 14:20:25 +00:00
Brian Osman
60c774db3e Support shared GL contexts in GrContextFactory
Mostly plumbing, plus some minimal testing to make sure that
the platform APIs don't explode. I plan to add testing of
SkCrossContextImageData using this, which should verify that
textures are actually shared.

Also found a factory and some related code in the
CommandBuffer test context that was totally unused.
BUG=skia:

Change-Id: I05bbc22c4d1ef946b702a5cc7f67788785219c62
Reviewed-on: https://skia-review.googlesource.com/8808
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-22 13:32:56 +00:00
csmartdalton
e812d496aa Rename GrContextFactory::ContextOptions to ContextOverrides
Also changes the behavior of these flags to only override their             
corresponding context options when set, and to leave them unchanged    
when not set.  

BUG=skia:

Change-Id: I09f6be09997594fa888d9045dd4901354ef3f880
Reviewed-on: https://skia-review.googlesource.com/8780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-02-21 21:45:45 +00:00
Robert Phillips
72152831a0 Move GrDrawingManager pointer to GrSurfaceContext
Change-Id: Ic285b24b384bbf284cc680fe770433dd4d643833
Reviewed-on: https://skia-review.googlesource.com/7561
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-01-26 13:15:14 +00:00
Brian Salomon
7f9c29a887 Revert "Remove sentinal GLContext used in early days of Vulkan in our tools"
This reverts commit bfd97c5935.

Reason for revert: Windows bots crashing.

Original change's description:
> Remove sentinal GLContext used in early days of Vulkan in our tools
> 
> I've ran this through multiple variations of dm and nanobench on Linux
> and no longer see any crash/hangs. I forget what the original repo case
> for the bug was, but I'm at least not seeing it now with updated drivers.
> 
> BUG=skia:
> 
> Change-Id: I6b7129a4c4d67938baa35d2e2c720cb078fc4c18
> Reviewed-on: https://skia-review.googlesource.com/7441
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

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

Change-Id: I94a16b2b13d09182232061b0aebd0d58df96db8a
Reviewed-on: https://skia-review.googlesource.com/7453
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-24 22:22:17 +00:00
Greg Daniel
bfd97c5935 Remove sentinal GLContext used in early days of Vulkan in our tools
I've ran this through multiple variations of dm and nanobench on Linux
and no longer see any crash/hangs. I forget what the original repo case
for the bug was, but I'm at least not seeing it now with updated drivers.

BUG=skia:

Change-Id: I6b7129a4c4d67938baa35d2e2c720cb078fc4c18
Reviewed-on: https://skia-review.googlesource.com/7441
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-01-24 18:57:36 +00:00
Robert Phillips
77505da160 Remove GrTestTarget
Change-Id: I4d2e1aa54732ff75b44a197255035c0e04548219
Reviewed-on: https://skia-review.googlesource.com/7327
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-20 16:47:34 +00:00
Robert Phillips
c37e61455d Rename GrContext::getFontAtlas to getFontAtlas_ForTesting
A trivial change but it does better indicate the nature of the method

Change-Id: I44a0e77dba28df892f4200496d78797ed5fd37df
Reviewed-on: https://skia-review.googlesource.com/7331
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-20 15:54:54 +00:00
Brian Salomon
189098e709 Don't require GrPipelineBuilder to build GrPipeline
Change-Id: Ic978913aa9dd0811eac102755934d77b4853a568
Reviewed-on: https://skia-review.googlesource.com/7207
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-01-19 15:54:51 +00:00
Brian Salomon
82f4431915 Make GrPaints move their GrProcessor ownership into GrPipelineBuilder.
This makes GrPaints usable only once. In some places we must make copies in order to issue draws with the same paint state.

Change-Id: Ie816e5185ce93a064111cad64c6880e1e21184c2
Reviewed-on: https://skia-review.googlesource.com/6844
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-11 19:56:48 +00:00
Brian Salomon
1090da6433 Add support for tagging GrUniqueKeys with a debug string
Change-Id: Ie7d56214fdee7a19a1e8ca3869e5e4d5e72cedf8
Reviewed-on: https://skia-review.googlesource.com/6632
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-06 17:54:03 +00:00
Brian Salomon
f833478191 Remove ref counting from GrOp.
Instead use std::unique_ptr to manage GrOp lifetime.

Change-Id: Ic1dc1e0ffd7254c3994221f498677af5bbf66a71
Reviewed-on: https://skia-review.googlesource.com/6479
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-01-03 15:22:16 +00:00
Brian Osman
3f375d055a Add skia_enable_discrete_gpu argument to GN
This forces all of our testing tools to run with the discrete GPU in
laptop systems that have that option.

BUG=skia:

Change-Id: Ibd7629d6de5f063cdf219b3c7469210af5085d90
Reviewed-on: https://skia-review.googlesource.com/6474
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-28 16:51:17 +00:00
Robert Phillips
22f4a1fd48 Remove getDevice_just_for_deprecated_compatibility_test()
BUG=skia:6067

Change-Id: I646e75f43bc77ea884b7fad7281bf0b684996bb9
Reviewed-on: https://skia-review.googlesource.com/6299
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-20 14:39:45 +00:00
Brian Salomon
2ee084e730 Rename GrBatchAtlas -> GrDrawOpAtlas.
Change-Id: I776f37e42dcab8b16535c48df9c405b1f211f6c9
Reviewed-on: https://skia-review.googlesource.com/6165
Commit-Queue: Brian Salomon <brian@thesalomons.net>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-17 00:35:39 +00:00
Brian Salomon
903da79a19 Rename GrBatchAtlas files to GrDrawOpAtlas
This intermediary change only exists to make the actual class rename change readable on gerrit due to gerrit not recognizing file renames correctly.

Change-Id: I919f84837fb17191ca49f00f82e56330f84766da
Reviewed-on: https://skia-review.googlesource.com/6190
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-16 23:50:06 +00:00
Brian Salomon
f856fd1ccd Rename GrBatchFontCache->GrAtlasGlyphCache
Change-Id: Ie21e18b631daa24e70df630b9f910213f62bdbdf
Reviewed-on: https://skia-review.googlesource.com/6164
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-16 19:48:35 +00:00
Brian Salomon
1951f3ddbd Rename testingOnly_drawBatch to testingOnly_addDrawOp and sk_sp
Change-Id: I35efd4ad2b7132145c1e477f0b1f283276e9fad5
Reviewed-on: https://skia-review.googlesource.com/5704
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-09 22:28:31 +00:00
Brian Salomon
21aa35f0aa Make GrRenderTargetOpList::addDrawOp use sk_sp
Change-Id: I1b3aee2c16075bc481d96052a82f3b3da82061fe
Reviewed-on: https://skia-review.googlesource.com/5699
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-09 21:38:46 +00:00
Brian Salomon
0e8fc8b9e6 Relandx2 "Remove antialiasing control from GrPaint."
Fixes a bad merge.

This reverts commit 073285c059.

Change-Id: I5e92339d9b33d3a6dc58b9fcd2a1b3a5684e8f8a
Reviewed-on: https://skia-review.googlesource.com/5774
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-09 20:43:41 +00:00
Brian Salomon
073285c059 Revert "Reland "Remove antialiasing control from GrPaint.""
This reverts commit 3944484020.

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

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

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

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

This reverts commit 419d81eed4.

BUG=skia:

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