aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/CopySurfaceTest.cpp
Commit message (Collapse)AuthorAge
* implemented copy surface as draw for metal gpu backendGravatar Timothy Liang2018-07-31
| | | | | | | | Bug: skia: Change-Id: Ie61bd6ad9f288b8a025d44f887a0954101a7d710 Reviewed-on: https://skia-review.googlesource.com/142687 Commit-Queue: Timothy Liang <timliang@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove SK_SUPPORT_GPU checks in tool-only codeGravatar Brian Osman2018-05-31
| | | | | | | | | | | | | | | | Most of this is (obviously) not necessary to do, but once I started, I figured I'd just get it all. Tools (nanobench, DM, skiaserve), all GMs, benches, and unit tests, plus support code (command line parsing and config stuff). This is almost entirely mechanical. Bug: skia: Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb Reviewed-on: https://skia-review.googlesource.com/131153 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* IWYU for some more test files starting with 'C'.Gravatar Ben Wagner2018-04-17
| | | | | | | Change-Id: I010527b342cbfa0b425ef0d00966219413d9e77d Reviewed-on: https://skia-review.googlesource.com/121886 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Initial texture data is never flipped when uploaded.Gravatar Brian Salomon2018-03-07
| | | | | | | | | The first bytes of the data always refer to the pixel accessed by texture coord (0, 0). Change-Id: I708702d90f35b3bc896a48c3c3fd6a0be73f505a Reviewed-on: https://skia-review.googlesource.com/112261 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove GrSurfaceOrigin from GrSurfaceDesc.Gravatar Brian Salomon2018-03-05
| | | | | | | | | | | | This field has no interpretation at the GrTexture/GrGpu as the orientation is handled at the GrSurfaceProxy level. This change requires GrGpu to accept a GrSurfaceOrigin when creating a texture with initial data. The origin refers to the texel data to be uploaded. Longer term the plan is to remove this and require the data to be kTopLeft. Additionally, kBottomLeft will only be allowed for wrapped texture/RTs as this evolves. Change-Id: I7d25b0199aafd9bf3b74c39b2cae451acadcd772 Reviewed-on: https://skia-review.googlesource.com/111806 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add SkSurface_Gpu::MakeWrappedRenderTarget methodGravatar Robert Phillips2018-01-31
| | | | | | | | | This is pulled out of https://skia-review.googlesource.com/c/skia/+/101480 (Implement GPU/OpList DDLs) Change-Id: I12b1ac346c7c1fa10f2120bc92bee63c93fc2249 Reviewed-on: https://skia-review.googlesource.com/102101 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Funnel most proxy creation through GrProxyProviderGravatar Robert Phillips2018-01-16
| | | | | | | | | This is to provide a choke point for DDL to create Lazy Proxies. Change-Id: If178da13bc6447b31b7601810236d34502d9efbd Reviewed-on: https://skia-review.googlesource.com/93303 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add GrProxyProviderGravatar Robert Phillips2018-01-08
| | | | | | | | | This pulls all the proxy tracking & creation functionality out of the GrResourceCache and GrResourceProvider and consolidates it in the GrProxyProvider. Change-Id: I7256f7c544319a70c1bd93dd5a9ccbe5fa0a544f Reviewed-on: https://skia-review.googlesource.com/91501 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove GrGpu.h from GrResourceProvider.hGravatar Robert Phillips2017-06-15
| | | | | | | | | Noticed this while cleaning up GrResourceProvider.h's usage. It seems like a powerful header to just be splashing around. Change-Id: I686fea61354a7e3c1c759627ffe4a560f7945f83 Reviewed-on: https://skia-review.googlesource.com/20040 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Retract GrTexture*.h & GrRenderTarget*.h from other headersGravatar Robert Phillips2017-06-13
| | | | | | | | | 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>
* Add GrRenderTargetContext::resourceProvider & GrResourceProvider::capsGravatar Robert Phillips2017-03-14
| | | | | | | | | and retract GrSurfaceContextPriv a bit Change-Id: Id47af1052f9bda4fe7c85b3ce46b3ebe37797524 Reviewed-on: https://skia-review.googlesource.com/9647 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rebase and fix chromiumGravatar Brian Osman2017-03-04
| | | | | | | | | | | | | | 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>
* Make GrSurface::MakeDeferred return sk_sp<GrTextureProxy>Gravatar Robert Phillips2017-03-03
| | | | | | | | | This should make upcoming changes less tedious Change-Id: I313ae9df724f109a64cf5708a974e8bfeb963025 Reviewed-on: https://skia-review.googlesource.com/9183 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Use GrSurfaceContext::read/write-Pixels moreGravatar Robert Phillips2017-01-25
| | | | | | | | Change-Id: I04bcaf91aa7a43e0563e332c1fe2836d762a04d4 Reviewed-on: https://skia-review.googlesource.com/7520 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Move read/write-Pixels up to GrSurfaceContextGravatar Robert Phillips2017-01-18
| | | | | | | | | | | | | | This still needs to be propagated out in several ways: replace more instances of GrSurface::read/write-Pixels add colorSpace to more instances of the TextureContext but it establishes a beach-head and is exciting enough as is. Change-Id: If86035aa0245e70b54541e83722b3c75bc5ade13 Reviewed-on: https://skia-review.googlesource.com/7172 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add a deferred copy surface (take 3)Gravatar Robert Phillips2016-12-15
| | | | | | | | | | | | | | This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) Change-Id: Ib8fd96d0569274ef781366eb900ed8ee839ae9bd Reviewed-on: https://skia-review.googlesource.com/6109 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Add a deferred copy surface (take 2)"Gravatar Robert Phillips2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 398487a850431cf495330d4023607df5305a311f. Reason for revert: See if this is causing the roll failure Original change's description: > Add a deferred copy surface (take 2) > > This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). > > There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. > > This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) > > Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4 > Reviewed-on: https://skia-review.googlesource.com/5939 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1ef40f0d5fb0bca62031f94f10eb18acd753e913 Reviewed-on: https://skia-review.googlesource.com/6024 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add a deferred copy surface (take 2)Gravatar Robert Phillips2016-12-13
| | | | | | | | | | | | | | This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4 Reviewed-on: https://skia-review.googlesource.com/5939 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Add a deferred copy surface"Gravatar Robert Phillips2016-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4431de6af930a8638c194b072558ea3a4b79d908. Reason for revert: ANGLE errors (at the very least) Original change's description: > Add a deferred copy surface > > This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). > > There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. > > Change-Id: Iab1867668d8146a766201158a251b9174438ee2b > Reviewed-on: https://skia-review.googlesource.com/5773 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I61408d9e306b9b1ab32f93ab086e95184e12857f Reviewed-on: https://skia-review.googlesource.com/5938 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add a deferred copy surfaceGravatar Robert Phillips2016-12-13
| | | | | | | | | | | | This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. Change-Id: Iab1867668d8146a766201158a251b9174438ee2b Reviewed-on: https://skia-review.googlesource.com/5773 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* tests: s/SkAutoTUnref/sk_sp/Gravatar Hal Canary2016-11-04
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4394 Change-Id: I088b3c6e2adff07abed1e8a50091cc0ec4a4109c Reviewed-on: https://skia-review.googlesource.com/4394 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Turn ContextInfos returned by GrContextFactory into structs.Gravatar bsalomon2016-05-11
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1966013002 Review-Url: https://codereview.chromium.org/1966013002
* Make more unit tests run on VulkanGravatar bsalomon2016-04-12
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885623002 Review URL: https://codereview.chromium.org/1885623002
* Make existing unit tests only run on GL contextsGravatar bsalomon2016-04-06
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869503002 Review URL: https://codereview.chromium.org/1869503002
* One signature for creating unit tests that run on premade GrContextsGravatar bsalomon2016-04-05
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1860593002 Review URL: https://codereview.chromium.org/1860593002
* Move Budgeted enum out of SkSurface, use in GrTextureProviderGravatar bsalomon2016-02-25
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005 DOCS_PREVIEW= https://skia.org/?cl=1728093005 Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1728093005
* Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider ↵Gravatar bsalomon2016-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | (patchset #6 id:100001 of https://codereview.chromium.org/1728093005/ ) Reason for revert: Need workaround for chrome to build Original issue's description: > Move Budgeted enum out of SkSurface, use in GrTextureProvider > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005 > DOCS_PREVIEW= https://skia.org/?cl=1728093005 > > Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c TBR=reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1734043002
* Move Budgeted enum out of SkSurface, use in GrTextureProviderGravatar bsalomon2016-02-25
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005 DOCS_PREVIEW= https://skia.org/?cl=1728093005 Review URL: https://codereview.chromium.org/1728093005
* Make copySurface work for texture dsts, return a bool, & add unit test.Gravatar bsalomon2016-02-16
| | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684313002 Committed: https://skia.googlesource.com/skia/+/7ea5e28065e5eb797e95f5d81c1a65cf3209d741 Review URL: https://codereview.chromium.org/1684313002
* Revert of Make copySurface work for texture dsts, return a bool, & add unit ↵Gravatar kjlubick2016-02-11
| | | | | | | | | | | | | | | | | | | | | | | test. (patchset #6 id:100001 of https://codereview.chromium.org/1684313002/ ) Reason for revert: Copy surface tests are not happy for Windows, Android and probably others: https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release/builds/4161 https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Release/builds/3694 Original issue's description: > Make copySurface work for texture dsts, return a bool, & add unit test. > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684313002 > > Committed: https://skia.googlesource.com/skia/+/7ea5e28065e5eb797e95f5d81c1a65cf3209d741 TBR=robertphillips@google.com,bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1690053002
* Make copySurface work for texture dsts, return a bool, & add unit test.Gravatar bsalomon2016-02-11
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684313002 Review URL: https://codereview.chromium.org/1684313002