aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GrContextFactoryTest.cpp
Commit message (Collapse)AuthorAge
* Dest color space no longer impacts mipmaps or texture samplingGravatar Brian Osman2018-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PS5: Removes SkDestinationSurfaceColorMode, tracking of mipmap mode on GrTexture, sRGB decode state per-texture. Because we were often choosing sRGB configs for RGB color types, legacy rendering would then be incorrect (too dark). So... PS7: Stops ever using sRGB pixel configs when translating image info or color type. Also removes a bunch of GrCaps bits and a GrContextOption that are no longer relevant. PS9: Adjusts surface creation unit test expectations, and changes the raster rules accordingly. At this point, sRGB configs are (obviously) going to be broken. Locally, I ran 8888, gl, and the gbr- versions of both. Across all GMs x configs, there are 13 diffs. 12 are GMs that create surfaces with a color-space attached (and thus, the offscreen is no longer getting sRGB pixel config). The only remainder constructs an SkPictureImageGenerator, (with an attached color space) and renders it to the gbr-gl canvas, which triggers a a tagged surface inside the generator. Bug: skia: Change-Id: Ie5edfa157dd799f3121e8173fc4f97f6c8ed6789 Reviewed-on: https://skia-review.googlesource.com/131282 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@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>
* Make GrCaps and GrShaderCaps private.Gravatar Brian Salomon2018-05-11
| | | | | | | | | Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps(). Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866 Reviewed-on: https://skia-review.googlesource.com/127389 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Move internal calls from GrContext to GrContextPrivGravatar Robert Phillips2018-03-06
| | | | | | | | | | A mechanical bulk move just to get these out of the public API. TBR=bsalomon@google.com Change-Id: I813efbd54a09dd448275697c0e50947753a5cfd3 Reviewed-on: https://skia-review.googlesource.com/112262 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Use GrContextFactories that produce a single GrContext in unit tests.Gravatar Brian Salomon2017-11-15
| | | | | | | | | | | | | | | | | | | | | This is to alleviate problems due to the command buffer getting bent out of shape when the current OpenGL context is switched out from under it (because we ran a test with a native GL context). This, however is not a full solution. More changes will be required to ensure that after running each command buffer or native test we bind the null context. This does allow us to take a step in that direction without breaking anything too badly. Moreover, there is no real benefit to reusing a GrContextFactory. Modifies DEF_GPUTEST to take GrContextOptions rather than a factory to use. Tests were already using their own factories anyway. In tests that use GrContextFactory the factory instance is moved to the inner loop. Modifies gpucts and skia_test to not use persistent GrContextFactories. Change-Id: Ie7a36793545c775f2f30653ead6fec93a3d22717 Reviewed-on: https://skia-review.googlesource.com/71861 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add FIFO thread pool, use it for most things.Gravatar Mike Klein2017-09-01
| | | | | | | | | | | | | | | | | | | We like a LIFO default thread pool in tools like DM for better memory/time locality... the bots use less memory this way, and generally run faster. But most use cases want a FIFO queue, so that they can get going on the next parts of early work while later work is still running. This splits the implementation into one using SkTArray and pop_back for LIFO, and a new one using std::deque and pop_front for FIFO. Change-Id: Ief203b6869a00f1f8084019431a781d15fc63750 Reviewed-on: https://skia-review.googlesource.com/41849 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add an (optional) SkTaskGroup to GrContextGravatar Brian Osman2017-08-23
| | | | | | | | | | | | | GrContextOptions has an SkExecutor field, allowing clients to supply a thread pool. If present, the GrContext will create an SkTaskGroup that can be used for internal threading work. Bug: skia: Change-Id: I8b01245515a21a83f9fe838caf0a01c9a26c0003 Reviewed-on: https://skia-review.googlesource.com/37580 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Revert "GrContext::dump that produces JSON formatted output""Gravatar Brian Osman2017-08-10
| | | | | | | | | | This reverts commit 0f450acd76fd58a2f7464f99869ed6afbfac303c. Bug: skia: Change-Id: I97428fbbc6d82bf8b186ec5fdbf1a939c00e4126 Reviewed-on: https://skia-review.googlesource.com/32726 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "GrContext::dump that produces JSON formatted output"Gravatar Brian Osman2017-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 175af0d01177fc6e5a81e979cd2ae3009c375940. Reason for revert: Chrome doesn't know about portable format specifiers. Sigh. Original change's description: > GrContext::dump that produces JSON formatted output > > Includes caps, GL strings, and extensions > > Bug: skia: > Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef > Reviewed-on: https://skia-review.googlesource.com/32340 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,brianosman@google.com Change-Id: Ie280b25275725f0661da7541f54ed62897abb82f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/32861 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* GrContext::dump that produces JSON formatted outputGravatar Brian Osman2017-08-09
| | | | | | | | | | Includes caps, GL strings, and extensions Bug: skia: Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef Reviewed-on: https://skia-review.googlesource.com/32340 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add another null check for the Vk NexusPlayer botGravatar Brian Osman2017-02-28
| | | | | | | | | | | | That bot has flaky failures creating contexts, and it consistently fails this test. It probably can't create two contexts at the same time. BUG=skia: Change-Id: If6363bff22882378f51281f1cbdac8b3ef510af2 Reviewed-on: https://skia-review.googlesource.com/9067 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fixes to shared context test APIGravatar Brian Osman2017-02-27
| | | | | | | | | | | | 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>
* Support shared GL contexts in GrContextFactoryGravatar Brian Osman2017-02-22
| | | | | | | | | | | | | | | | 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>
* Rename GrContextFactory::ContextOptions to ContextOverridesGravatar csmartdalton2017-02-21
| | | | | | | | | | | | | 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>
* Add ContextOptions field to SkCommandLineConfigGpuGravatar csmartdalton2016-09-13
| | | | | | | | | Reduces duplicate code by computing the ContextOptions in one spot. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2337163002 Review-Url: https://codereview.chromium.org/2337163002
* Make unit tests use generic testcontext rather than glcontextGravatar bsalomon2016-05-11
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1971613003 Review-Url: https://codereview.chromium.org/1971613003
* 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
* Vulkan config in dmGravatar bsalomon2016-04-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1872283003 Review URL: https://codereview.chromium.org/1872283003
* 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
* Rename enums in GrContextFactory to remove "GL"Gravatar bsalomon2016-04-05
| | | | | | | | | | Also, remove kNative as a separate context type and instead make it an alias for kGL or kGLES based on OS. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1845923004 Committed: https://skia.googlesource.com/skia/+/2d9c6f81353597aebf5934547e5cba7a872196fb Review URL: https://codereview.chromium.org/1845923004
* Revert of Rename enums in GrContextFactory to remove "GL" (patchset #4 ↵Gravatar bsalomon2016-04-04
| | | | | | | | | | | | | | | | | | | | | | id:60001 of https://codereview.chromium.org/1845923004/ ) Reason for revert: Many GM images unexpectedly changed with this CL. Original issue's description: > Rename enums in GrContextFactory to remove "GL" > > Also, remove kNative as a separate context type and instead make it an alias for kGL or kGLES based on OS. > > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1845923004 > > Committed: https://skia.googlesource.com/skia/+/2d9c6f81353597aebf5934547e5cba7a872196fb TBR=egdaniel@google.com,jvanverth@google.com # Not skipping CQ checks because original CL landed more than 1 days ago. Review URL: https://codereview.chromium.org/1856703002
* Rename enums in GrContextFactory to remove "GL"Gravatar bsalomon2016-04-01
| | | | | | | | Also, remove kNative as a separate context type and instead make it an alias for kGL or kGLES based on OS. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1845923004 Review URL: https://codereview.chromium.org/1845923004
* Move SkGLContext and some GrGLInterface implementations to skgputest moduleGravatar bsalomon2016-03-30
| | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58 Review URL: https://codereview.chromium.org/1815823002
* Enable gpusrgb config on bots.Gravatar brianosman2016-03-30
| | | | | | | | | | Don't run the config if we can't get a context with srgb support. Includes a unit test for that logic. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1846603002 Review URL: https://codereview.chromium.org/1846603002
* Revert of Move SkGLContext and some GrGLInterface implementations to ↵Gravatar robertphillips2016-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | skgputest module (patchset #13 id:240001 of https://codereview.chromium.org/1815823002/ ) Reason for revert: red bots Original issue's description: > Move SkGLContext and some GrGLInterface implementations to skgputest module > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002 > CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot > > Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58 TBR=jvanverth@google.com,bsalomon@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/1845473004
* Move SkGLContext and some GrGLInterface implementations to skgputest moduleGravatar bsalomon2016-03-30
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002 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/1815823002
* Make SkGLContext lifetime more well-definedGravatar kkinnunen2016-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove refcounting from SkGLContext. SkGLContext is expected to behave like GrContextFactory would own it, as implied by the GrContextFactory function. If it is refcounted, this does not hold. Also other use sites, such as in SkOSWindow_win (command buffer gl object), confirm the behavior. The object is explicitly owned and destroyed, not shared. Also fixes potential crashes from using GL context of an abandoned context. Also fixes potential crashes in DM/nanobench, if the GrContext lives longer than GLContext through internal refing of GrContext. Moves the non-trivial implementations from GrContextFactory.h to .cpp, just for consistency sake. Changes pathops_unittest.gyp. The pathops_unittest uses GrContextFactory, but did not link to its implementation. The reason they worked was that the implementation used (constructors, destructors) happened to be in the .h file. This works towards being able to use command buffer and NVPR from the SampleApp. BUG=skia:2992 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005 Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da Review URL: https://codereview.chromium.org/1511773005
* Revert of Make SkGLContext lifetime more well-defined (patchset #7 id:120001 ↵Gravatar jcgregorio2016-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1511773005/ ) Reason for revert: Broke tests on Android, iOS, Mac and Windows. Original issue's description: > Make SkGLContext lifetime more well-defined > > Remove refcounting from SkGLContext. > > SkGLContext is expected to behave like GrContextFactory would own > it, as implied by the GrContextFactory function. > > If it is refcounted, this does not hold. > > Also other use sites, such as in SkOSWindow_win (command buffer gl > object), confirm the behavior. The object is explicitly owned and > destroyed, not shared. > > Also fixes potential crashes from using GL context of an abandoned > context. > > Also fixes potential crashes in DM/nanobench, if the GrContext lives > longer than GLContext through internal refing of GrContext. > > Moves the non-trivial implementations from GrContextFactory.h to > .cpp, just for consistency sake. > > Changes pathops_unittest.gyp. The pathops_unittest uses > GrContextFactory, but did not link to its implementation. The reason > they worked was that the implementation used (constructors, destructors) > happened to be in the .h file. > > This works towards being able to use command buffer and NVPR from > the SampleApp. > > BUG=skia:2992 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005 > > Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da TBR=bsalomon@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:2992 Review URL: https://codereview.chromium.org/1555053003
* Make SkGLContext lifetime more well-definedGravatar kkinnunen2016-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove refcounting from SkGLContext. SkGLContext is expected to behave like GrContextFactory would own it, as implied by the GrContextFactory function. If it is refcounted, this does not hold. Also other use sites, such as in SkOSWindow_win (command buffer gl object), confirm the behavior. The object is explicitly owned and destroyed, not shared. Also fixes potential crashes from using GL context of an abandoned context. Also fixes potential crashes in DM/nanobench, if the GrContext lives longer than GLContext through internal refing of GrContext. Moves the non-trivial implementations from GrContextFactory.h to .cpp, just for consistency sake. Changes pathops_unittest.gyp. The pathops_unittest uses GrContextFactory, but did not link to its implementation. The reason they worked was that the implementation used (constructors, destructors) happened to be in the .h file. This works towards being able to use command buffer and NVPR from the SampleApp. BUG=skia:2992 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005 Review URL: https://codereview.chromium.org/1511773005
* Add config options to run different GPU APIs to dm and nanobenchGravatar kkinnunen2015-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add extended config specification form that can be used to run different gpu backend with different APIs. The configs can be specified with the form: gpu(api=string,dit=bool,nvpr=bool,samples=int) This replaces and removes the --gpuAPI flag. All existing configs should still work. Adds following documentation: out/Debug/dm --help config Flags: --config: type: string default: 565 8888 gpu nonrendering Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4 nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg xps or use extended form 'backend(option=value,...)'. Extended form: 'backend(option=value,...)' Possible backends and options: gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend api type: string default: native. Select graphics API to use with gpu backend. Options: native Use platform default OpenGL or OpenGL ES backend. gl Use OpenGL. gles Use OpenGL ES. debug Use debug OpenGL. null Use null OpenGL. dit type: bool default: false. Use device independent text. nvpr type: bool default: false. Use NV_path_rendering OpenGL and OpenGL ES extension. samples type: int default: 0. Use multisampling with N samples. Predefined configs: gpu = gpu() msaa4 = gpu(samples=4) msaa16 = gpu(samples=16) nvprmsaa4 = gpu(nvpr=true,samples=4) nvprmsaa16 = gpu(nvpr=true,samples=16) gpudft = gpu(dit=true) gpudebug = gpu(api=debug) gpunull = gpu(api=null) debug = gpu(api=debug) nullgpu = gpu(api=null) BUG=skia:2992 Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005 Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd Review URL: https://codereview.chromium.org/1490113005
* Revert of Add config options to run different GPU APIs to dm and nanobench ↵Gravatar rmistry2015-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #21 id:400001 of https://codereview.chromium.org/1490113005/ ) Reason for revert: The Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug builder fails after this CL. Links to specific builds: http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1689 http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1690 http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1691 Original issue's description: > Add config options to run different GPU APIs to dm and nanobench > > Add extended config specification form that can be used to run different > gpu backend with different APIs. > > The configs can be specified with the form: > gpu(api=string,dit=bool,nvpr=bool,samples=int) > > This replaces and removes the --gpuAPI flag. > > All existing configs should still work. > > Adds following documentation: > > out/Debug/dm --help config > > Flags: > --config: type: string default: 565 8888 gpu nonrendering > Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4 > nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg > xps or use extended form 'backend(option=value,...)'. > > Extended form: 'backend(option=value,...)' > > Possible backends and options: > > gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend > api type: string default: native. > Select graphics API to use with gpu backend. > Options: > native Use platform default OpenGL or OpenGL ES backend. > gl Use OpenGL. > gles Use OpenGL ES. > debug Use debug OpenGL. > null Use null OpenGL. > dit type: bool default: false. > Use device independent text. > nvpr type: bool default: false. > Use NV_path_rendering OpenGL and OpenGL ES extension. > samples type: int default: 0. > Use multisampling with N samples. > > Predefined configs: > > gpu = gpu() > msaa4 = gpu(samples=4) > msaa16 = gpu(samples=16) > nvprmsaa4 = gpu(nvpr=true,samples=4) > nvprmsaa16 = gpu(nvpr=true,samples=16) > gpudft = gpu(dit=true) > gpudebug = gpu(api=debug) > gpunull = gpu(api=null) > debug = gpu(api=debug) > nullgpu = gpu(api=null) > > BUG=skia:2992 > > Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005 > > Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b > > Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd TBR=mtklein@google.com,bsalomon@google.com,joshualitt@google.com,scroggo@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:2992 Review URL: https://codereview.chromium.org/1548683002
* Add config options to run different GPU APIs to dm and nanobenchGravatar kkinnunen2015-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add extended config specification form that can be used to run different gpu backend with different APIs. The configs can be specified with the form: gpu(api=string,dit=bool,nvpr=bool,samples=int) This replaces and removes the --gpuAPI flag. All existing configs should still work. Adds following documentation: out/Debug/dm --help config Flags: --config: type: string default: 565 8888 gpu nonrendering Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4 nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg xps or use extended form 'backend(option=value,...)'. Extended form: 'backend(option=value,...)' Possible backends and options: gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend api type: string default: native. Select graphics API to use with gpu backend. Options: native Use platform default OpenGL or OpenGL ES backend. gl Use OpenGL. gles Use OpenGL ES. debug Use debug OpenGL. null Use null OpenGL. dit type: bool default: false. Use device independent text. nvpr type: bool default: false. Use NV_path_rendering OpenGL and OpenGL ES extension. samples type: int default: 0. Use multisampling with N samples. Predefined configs: gpu = gpu() msaa4 = gpu(samples=4) msaa16 = gpu(samples=16) nvprmsaa4 = gpu(nvpr=true,samples=4) nvprmsaa16 = gpu(nvpr=true,samples=16) gpudft = gpu(dit=true) gpudebug = gpu(api=debug) gpunull = gpu(api=null) debug = gpu(api=debug) nullgpu = gpu(api=null) BUG=skia:2992 Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005 Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b Review URL: https://codereview.chromium.org/1490113005
* Revert of Add config options to run different GPU APIs to dm and nanobench ↵Gravatar joshualitt2015-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #18 id:340001 of https://codereview.chromium.org/1490113005/ ) Reason for revert: This CL changed 1200 images on gold, when I wouldn't expect any diffs from the description. Original issue's description: > Add config options to run different GPU APIs to dm and nanobench > > Add extended config specification form that can be used to run different > gpu backend with different APIs. > > The configs can be specified with the form: > gpu(api=string,dit=bool,nvpr=bool,samples=int) > > This replaces and removes the --gpuAPI flag. > > All existing configs should still work. > > Adds following documentation: > > out/Debug/dm --help config > > Flags: > --config: type: string default: 565 8888 gpu nonrendering > Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4 > nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg > xps or use extended form 'backend(option=value,...)'. > > Extended form: 'backend(option=value,...)' > > Possible backends and options: > > gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend > api type: string default: native. > Select graphics API to use with gpu backend. > Options: > native Use platform default OpenGL or OpenGL ES backend. > gl Use OpenGL. > gles Use OpenGL ES. > debug Use debug OpenGL. > null Use null OpenGL. > dit type: bool default: false. > Use device independent text. > nvpr type: bool default: false. > Use NV_path_rendering OpenGL and OpenGL ES extension. > samples type: int default: 0. > Use multisampling with N samples. > > Predefined configs: > > gpu = gpu() > msaa4 = gpu(samples=4) > msaa16 = gpu(samples=16) > nvprmsaa4 = gpu(nvpr=true,samples=4) > nvprmsaa16 = gpu(nvpr=true,samples=16) > gpudft = gpu(dit=true) > gpudebug = gpu(api=debug) > gpunull = gpu(api=null) > debug = gpu(api=debug) > nullgpu = gpu(api=null) > > BUG=skia:2992 > > Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005 > > Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b TBR=mtklein@google.com,bsalomon@google.com,scroggo@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:2992 Review URL: https://codereview.chromium.org/1536963002
* Add config options to run different GPU APIs to dm and nanobenchGravatar kkinnunen2015-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add extended config specification form that can be used to run different gpu backend with different APIs. The configs can be specified with the form: gpu(api=string,dit=bool,nvpr=bool,samples=int) This replaces and removes the --gpuAPI flag. All existing configs should still work. Adds following documentation: out/Debug/dm --help config Flags: --config: type: string default: 565 8888 gpu nonrendering Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4 nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg xps or use extended form 'backend(option=value,...)'. Extended form: 'backend(option=value,...)' Possible backends and options: gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend api type: string default: native. Select graphics API to use with gpu backend. Options: native Use platform default OpenGL or OpenGL ES backend. gl Use OpenGL. gles Use OpenGL ES. debug Use debug OpenGL. null Use null OpenGL. dit type: bool default: false. Use device independent text. nvpr type: bool default: false. Use NV_path_rendering OpenGL and OpenGL ES extension. samples type: int default: 0. Use multisampling with N samples. Predefined configs: gpu = gpu() msaa4 = gpu(samples=4) msaa16 = gpu(samples=16) nvprmsaa4 = gpu(nvpr=true,samples=4) nvprmsaa16 = gpu(nvpr=true,samples=16) gpudft = gpu(dit=true) gpudebug = gpu(api=debug) gpunull = gpu(api=null) debug = gpu(api=debug) nullgpu = gpu(api=null) BUG=skia:2992 Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005 Review URL: https://codereview.chromium.org/1490113005
* Revert of Add config options to run different GPU APIs to dm and nanobench ↵Gravatar reed2015-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #12 id:220001 of https://codereview.chromium.org/1490113005/ ) Reason for revert: speculative revert to see if it unblocks the DEPS roll https://codereview.chromium.org/1529443002 Original issue's description: > Add config options to run different GPU APIs to dm and nanobench > > Add extended config specification form that can be used to run different > gpu backend with different APIs. > > The configs can be specified with the form: > gpu(api=string,dit=bool,nvpr=bool,samples=int) > > This replaces and removes the --gpuAPI flag. > > All existing configs should still work. > > Adds following documentation: > > out/Debug/dm --help config > > Flags: > --config: type: string default: 565 8888 gpu nonrendering > Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4 > nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg > xps or use extended form 'backend(option=value,...)'. > > Extended form: 'backend(option=value,...)' > > Possible backends and options: > > gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend > api type: string default: native. > Select graphics API to use with gpu backend. > Options: > native Use platform default OpenGL or OpenGL ES backend. > gl Use OpenGL. > gles Use OpenGL ES. > debug Use debug OpenGL. > null Use null OpenGL. > dit type: bool default: false. > Use device independent text. > nvpr type: bool default: false. > Use NV_path_rendering OpenGL and OpenGL ES extension. > samples type: int default: 0. > Use multisampling with N samples. > > Predefined configs: > > gpu = gpu() > msaa4 = gpu(samples=4) > msaa16 = gpu(samples=16) > nvprmsaa4 = gpu(nvpr=true,samples=4) > nvprmsaa16 = gpu(nvpr=true,samples=16) > gpudft = gpu(dit=true) > gpudebug = gpu(api=debug) > gpunull = gpu(api=null) > debug = gpu(api=debug) > nullgpu = gpu(api=null) > > BUG=skia:2992 > > Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23 TBR=bsalomon@google.com,scroggo@google.com,joshualitt@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:2992 Review URL: https://codereview.chromium.org/1528473002
* Add config options to run different GPU APIs to dm and nanobenchGravatar kkinnunen2015-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add extended config specification form that can be used to run different gpu backend with different APIs. The configs can be specified with the form: gpu(api=string,dit=bool,nvpr=bool,samples=int) This replaces and removes the --gpuAPI flag. All existing configs should still work. Adds following documentation: out/Debug/dm --help config Flags: --config: type: string default: 565 8888 gpu nonrendering Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4 nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg xps or use extended form 'backend(option=value,...)'. Extended form: 'backend(option=value,...)' Possible backends and options: gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend api type: string default: native. Select graphics API to use with gpu backend. Options: native Use platform default OpenGL or OpenGL ES backend. gl Use OpenGL. gles Use OpenGL ES. debug Use debug OpenGL. null Use null OpenGL. dit type: bool default: false. Use device independent text. nvpr type: bool default: false. Use NV_path_rendering OpenGL and OpenGL ES extension. samples type: int default: 0. Use multisampling with N samples. Predefined configs: gpu = gpu() msaa4 = gpu(samples=4) msaa16 = gpu(samples=16) nvprmsaa4 = gpu(nvpr=true,samples=4) nvprmsaa16 = gpu(nvpr=true,samples=16) gpudft = gpu(dit=true) gpudebug = gpu(api=debug) gpunull = gpu(api=null) debug = gpu(api=debug) nullgpu = gpu(api=null) BUG=skia:2992 Review URL: https://codereview.chromium.org/1490113005
* Make NVPR a GL context option instead of a GL contextGravatar kkinnunen2015-12-10
| | | | | | | | | | | | | | | | | Make NVPR a GL context option instead of a GL context. This may enable NVPR to be run with command buffer interface. No functionality change in DM or nanobench. NVPR can only be run with normal GL APIs. BUG=skia:2992 Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1 Committed: https://skia.googlesource.com/skia/+/64492c43c3faee7ab0f69b1c84e0267616f85e52 Review URL: https://codereview.chromium.org/1448883002
* Revert of Make NVPR a GL context option instead of a GL context (patchset #9 ↵Gravatar borenet2015-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:160001 of https://codereview.chromium.org/1448883002/ ) Reason for revert: "Could not create surface" on Linux GTX660 bots Original issue's description: > Make NVPR a GL context option instead of a GL context > > Make NVPR a GL context option instead of a GL context. > This may enable NVPR to be run with command buffer > interface. > > No functionality change in DM or nanobench. NVPR can > only be run with normal GL APIs. > > BUG=skia:2992 > > Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1 > > Committed: https://skia.googlesource.com/skia/+/64492c43c3faee7ab0f69b1c84e0267616f85e52 TBR=mtklein@google.com,bsalomon@google.com,jvanverth@google.com,scroggo@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:2992 Review URL: https://codereview.chromium.org/1513703002
* Make NVPR a GL context option instead of a GL contextGravatar kkinnunen2015-12-08
| | | | | | | | | | | | | | | Make NVPR a GL context option instead of a GL context. This may enable NVPR to be run with command buffer interface. No functionality change in DM or nanobench. NVPR can only be run with normal GL APIs. BUG=skia:2992 Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1 Review URL: https://codereview.chromium.org/1448883002
* Skip dm GPU configs when context creation failsGravatar kkinnunen2015-12-03
| | | | | | | Skip dm GPU configs when context creation fails instead of stopping the whole dm run. Review URL: https://codereview.chromium.org/1497713002
* Revert of Make NVPR a GL context option instead of a GL context (patchset #2 ↵Gravatar bsalomon2015-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:20001 of https://codereview.chromium.org/1448883002/ ) Reason for revert: BUG=skia:4609 skbug.com/4609 Seems like GrContextFactory needs to fail when the NVPR option is requested but the driver version isn't sufficiently high. Original issue's description: > Make NVPR a GL context option instead of a GL context > > Make NVPR a GL context option instead of a GL context. > This may enable NVPR to be run with command buffer > interface. > > No functionality change in DM or nanobench. NVPR can > only be run with normal GL APIs. > > BUG=skia:2992 > > Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1 TBR=mtklein@google.com,jvanverth@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:2992 Review URL: https://codereview.chromium.org/1486153002
* Make NVPR a GL context option instead of a GL contextGravatar kkinnunen2015-12-01
| | | | | | | | | | | | | Make NVPR a GL context option instead of a GL context. This may enable NVPR to be run with command buffer interface. No functionality change in DM or nanobench. NVPR can only be run with normal GL APIs. BUG=skia:2992 Review URL: https://codereview.chromium.org/1448883002
* Remove GrContextFactory::getGLContextGravatar kkinnunen2015-11-22
| | | | | | | | | | | | | | | | | Remove GrContextFactory::getGLContext, it is problematic: It has the bug of not checking for the context type. It also is error-prone, since the GL context is not made current, but it is callers may assume it is current. It is also not used very much. Clients can use GrContextFactory::getContextInfo. BUG=skia: Review URL: https://codereview.chromium.org/1455093003
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Fix alpha textures in NV ES3 contexts on Windows.Gravatar bsalomon2014-07-17
| | | | | | | | | | | | Make unit tests iterate over all the rendering GL context types rather than using kNative. Fix the extension printing when gStartupSpew is set. R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/398183002
* Preprend Test to test function name generated by DEF_TEST() macro.Gravatar tfarina2014-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | That way when declaring a test with DEF_TEST() macro, you don't have to uniquify the test name because it might colide with the class it is being testing. For example, if you are testing SkBase64 and do: DEF_TEST(SkBase64, reporter) { } That will generate an error because the macro will declare a function named SkBase64 which colides with the type SkBase64. By adding Test to the function name we avoid this problem. Fixed the entries found with the following command line: $ git grep "Test, r" | grep DEF BUG=None TEST=make tests && out/Debug/tests R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/345753007
* Move macros from TestClassDef.h to Test.hGravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | Motivation: those macros don't make any sense without the definitions in Test.h. BUG= R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/138563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a DEF_GPUTEST() macro.Gravatar tfarina@chromium.org2014-01-10
| | | | | | | | | | | | | This macro is similar to DEF_TEST() and simplifies the process of setting up a GPU test. BUG=skia:1952 TEST=tests R=mtklein@google.com Review URL: https://codereview.chromium.org/132293005 git-svn-id: http://skia.googlecode.com/svn/trunk@13033 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add --threads to tests binary, to run non-GPU tests on multiple cores.Gravatar commit-bot@chromium.org2013-04-19
| | | | | | | | | | | | | | | | | | | | On my quad-core laptop I can get about a 3x speedup: Debug, --threads 0 40.99s Debug, --threads 8 14.39s Release, --threads 0 8.24s Release, --threads 8 2.80s I also removed some unused Test.{h,cpp} APIs and refactored a little to make things thread-safer. BUG= R=borenet@google.com, djsollen@google.com, scroggo@google.com, reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/13855007 git-svn-id: http://skia.googlecode.com/svn/trunk@8763 2bbb7eff-a529-9590-31e7-b0007b416f81
* GrContextFactory can now expose the GLContext it is using.Gravatar keyar@chromium.org2012-08-14
Review URL: https://codereview.appspot.com/6461081 git-svn-id: http://skia.googlecode.com/svn/trunk@5105 2bbb7eff-a529-9590-31e7-b0007b416f81