aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
Commit message (Collapse)AuthorAge
* Initial refactor of shaderbuilder to prepare for geometry shadersGravatar joshualitt2014-08-21
| | | | | | | | | | | gitignore for eclipse BUG=skia: R=bsalomon@google.com, bsalomon@chromium.org Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/491673002
* Split up monolithic EXPERIMENTAL_drawPicture methodGravatar robertphillips2014-08-21
| | | | | | | | | | | | This is prep for the new multi-picture API. This is split out of (Add new API to allow layer hoisting/atlasing across picture piles - https://codereview.chromium.org/474623002/) R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/489103002
* Add GrResourceCache2.Gravatar bsalomon2014-08-21
| | | | | | | | | | | | Currently it just replaces GrGpu as the owner of the linked list of resources. Committed: https://skia.googlesource.com/skia/+/94ce9ac8624dbb45656b8f5c992fad9c9ff3ee5f R=mtklein@google.com, robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/481443002
* Revert of Add GrResourceCache2. (patchset #4 of ↵Gravatar bsalomon2014-08-19
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/481443002/) Reason for revert: Likely caused a leak detected in Chromium after last Skia roll. Original issue's description: > Add GrResourceCache2. > > Currently it just replaces GrGpu as the owner of the linked list of resources. > > Committed: https://skia.googlesource.com/skia/+/94ce9ac8624dbb45656b8f5c992fad9c9ff3ee5f R=mtklein@google.com, robertphillips@google.com TBR=mtklein@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: bsalomon@google.com Review URL: https://codereview.chromium.org/477323006
* Add GrResourceCache2.Gravatar bsalomon2014-08-19
| | | | | | | | | | Currently it just replaces GrGpu as the owner of the linked list of resources. R=robertphillips@google.com, mtklein@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/481443002
* eliminate code related to SkBitmap::ConfigGravatar reed2014-08-18
| | | | | | | | | BUG=skia: R=reed@google.com, mike@reedtribe.org Author: reed@chromium.org Review URL: https://codereview.chromium.org/483593002
* Add flag to bench/render picturesGravatar krajcevski2014-08-18
| | | | | | | | R=robertphillips@google.com, bsalomon@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/464423003
* Add entry point for passing options to the GrContextFactoryGravatar krajcevski2014-08-13
| | | | | | | | R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/465073002
* Add a parameter GR_ALWAYS_ALLOCATE_ON_HEAP to allow for only ever creating ↵Gravatar george2014-08-12
| | | | | | | | | | | | | temporary buffers on the heap instead of allowing stack allocation Unfortunately this can't be a GR_GL_* config like we'd discussed because there are SkAutoSMalloc buffers that are built outside of gl/ R=bsalomon@google.com, bsalomon BUG=skia: Author: george@mozilla.com Review URL: https://codereview.chromium.org/459263003
* Change GR_COMPRESS_ALPHA_MASK from compile-time flag to run-time. We do this ↵Gravatar krajcevski2014-08-12
| | | | | | | | | | by introducing an Options struct to be passed to a GrContext on creation. R=robertphillips@google.com, bsalomon@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/459033002
* Consider index8 a compressed config.Gravatar bsalomon2014-08-11
| | | | | | | | R=krajcevski@google.com, robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/457333004
* Wrap NV_path_rendering API with GrGLPathRenderingGravatar cdalton2014-08-11
| | | | | | | | | | | | | | Adds a GrGLPathRendering class that wraps the NV_path_rendering extension and manages its various API versions. It also provides backup implementations when certain NVpr methods from later API versions are not present on the current system. BUG=skia: R=bungeman@google.com, bsalomon@google.com, kkinnunen@nvidia.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/444223002
* Always use both a color and coverage attribute in GrAARectRenderer.Gravatar bsalomon2014-08-11
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/435743002
* add drawPicture variant that takes a matrix and paintGravatar reed2014-08-09
| | | | | | | | | | will need some staging strategy, since chrome and blink have overrides of onDrawPicture R=robertphillips@google.com, fmalita@google.com, bsalomon@google.com, mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/448793004
* Pretty print of shadersGravatar joshualitt2014-08-08
| | | | | | | | | BUG=skia: R=bsalomon@chromium.org, senorblanco@chromium.org, bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/437593004
* Remove external SkImageFilter cache, and rename UniqueIDCache -> Cache.Gravatar senorblanco2014-08-08
| | | | | | | | | | | | There Can Only Be One.... Cache for SkImageFilter. R=bsalomon@google.com BUG=skia: Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/452923002
* Cleanup of context initializationGravatar joshualitt2014-08-07
| | | | | | | | | | | Cleanup context initialization on linux BUG=skia: R=bsalomon@chromium.org, bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/422323003
* Revert "Adds a GrGLPathRendering class that wraps the NV_path_rendering"Gravatar bungeman2014-08-06
| | | | | | | | | | | | | | | | | | This reverts commit 5672da0fa54f31c9727568e9dd5fe82c6e1585bc. This appears to be blocking the Skia roll by causing failures in the blink layout tests on the canvas-lost-gpu-context.html test. The bisect for this can be seen at: https://codereview.chromium.org/449473002/ Original issue's description: > Adds a GrGLPathRendering class that wraps the NV_path_rendering > extension and manages its various API versions. It also provides > backup implementations when certain NVpr methods from later API > versions are not present on the current system. > > Committed: https://skia.googlesource.com/skia/+/5672da0fa54f31c9727568e9dd5fe82c6e1585bc
* Enable gpu Debug markers if tracing category skia.gpu is enabledGravatar egdaniel2014-08-04
| | | | | | | | | BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/438023004
* Adds a GrGLPathRendering class that wraps the NV_path_renderingGravatar cdalton2014-08-04
| | | | | | | | | | | | extension and manages its various API versions. It also provides backup implementations when certain NVpr methods from later API versions are not present on the current system. R=bsalomon@google.com, kkinnunen@nvidia.com, markkilgard@gmail.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/437473002
* Don't compare coord change matrices to determine effect compatibility when ↵Gravatar bsalomon2014-08-04
| | | | | | | | | | using explicit local coords. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/438053002
* Remove unused matrix param from GrContext/GrDrawTarget rect drawing functions.Gravatar bsalomon2014-08-04
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/441623005
* Implement a persistent uniqueID-based cache for SkImageFilter.Gravatar senorblanco2014-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a unique ID to SkImageFilter, and use it as part of a persistent cache of image-filtered results. This is used for caching frame-to-frame coherent filters. We also keep track of which filter subtrees do not reference the src input, and use a GenID of zero for the src input in that case. That way, subtrees which are not dependent on the filter input can be cached independently of it. This gives approximately a 4X speedup on letmespellitoutforyou.com/samples/svg/filter_terrain.svg on Z620 and Nexus10. The cache key consists of the uniqueID of the filter, the clip bounds, the CTM and the genID of the input bitmap. Since this does not yet handle the case where the input primitives (and part of the resulting filter tree) are unchanged, we have to keep around the external cache for that painting case. When the work to cache unchanging input primitives is done, the old cache can be removed, and the new UniqueIDCache will be renamed to Cache. R=bsalomon@google.com, mtklein@google.com Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/414483003
* Incorporate glStencilThenCover* nvpr methodsGravatar cdalton2014-07-29
| | | | | | | | | | | | | | | | | | Adds the glStencilThenCover* nvpr methods to GrGLInterface and starts using them. When drawing multible paths, this will make it so we only have to send the index/transform data once. It will also allow the driver to save time internally. The glStencilThenCover* methods are a newer addition, so they aren't available on every driver. In the event that they are not present, we emulate them using the existing glStencil*/glCover* methods. BUG=skia: R=markkilgard@gmail.com, bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/423173004
* Remove support in the gpu to use hardware AA lines. Current code paths could ↵Gravatar egdaniel2014-07-29
| | | | | | | | | | | | | not reach this code and thus was never used. The blend opt flag kDisableBlend should now be able to be removed, however it is left in this CL and will removed in its own. BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/427823002
* Revert of Remove gpu support for willUseHWAALines. ↵Gravatar egdaniel2014-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/423943003/) Reason for revert: Breaking windows 7 compare gm's Original issue's description: > Remove gpu support for willUseHWAALines. > > By removing willUseHWAALines, we also no long reference the blend opt flag kDisableBlend so it has been removed > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/e6dfba868c19b00562f8c733b9bf37dd4ec9e68c R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: egdaniel@google.com Review URL: https://codereview.chromium.org/430493003
* Some fixes around GrContext::abandonContext:Gravatar bsalomon2014-07-29
| | | | | | | | | | | | | | Fix debug crash when GrResourceCache is destroyed after GrContext is abandoned while GrTextures are in the exlusive list. Notify debug GL context that GL resources are expected to remain undeleted when context is destroyed after being abandoned. Stop leaking program cache entries when context is abandoned. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/422323002
* Remove gpu support for willUseHWAALines.Gravatar egdaniel2014-07-29
| | | | | | | | | | | By removing willUseHWAALines, we also no long reference the blend opt flag kDisableBlend so it has been removed BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/423943003
* Test abandoning GL context in dm/nanobench.Gravatar bsalomon2014-07-28
| | | | | | | | | | | | Rename GrContext::contextDestroyed to GrContext::abandonContext. Remove GrContext::resetContext. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/422903002
* Fix thread unsafe mutex initialization.Gravatar bungeman2014-07-25
| | | | | | | | | BUG=skia:2779 R=robertphillips@google.com, mtklein@google.com, reed@android.com, bsalomon@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/419113002
* Rename GrGpuObject to GrGpuResourceGravatar bsalomon2014-07-25
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/418143004
* Merge GrGpuObject and GrCacheable.Gravatar bsalomon2014-07-25
| | | | | | | | | | We want to create a new base class for "meta" gr resources as part of the GrResourceCache rewrite and this is an iterim step towards that goal.s R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/414013005
* Add ASTC to list of alpha compressed formatsGravatar krajcevski2014-07-24
| | | | | | | | R=bsalomon@google.com, robertphillips@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/412113004
* Replace use of GrTHashTable in GrFontCache with SkTDynamicHash.Gravatar jvanverth2014-07-22
| | | | | | | | | | | Searching the font cache for existing text strikes was showing up as a hotspot on Android. This change reduces that cost. R=bsalomon@google.com, robertphillips@google.com, mtklein@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/390103002
* Revert "Revert of Use the GrCacheable ID to eliminate the need for ↵Gravatar bsalomon2014-07-22
| | | | | | | | | | | | | | notifications to GrGpuGL when textures and RTs are… (https://codereview.chromium.org/376703009/)" This reverts commit 249171e7d29b5559f3eefe9dbd437030bfad3fda. Uses 32 bit id instead of 64. Renamed instanceID to uniqueID to match existing code. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/414493002
* Remove unused enum value and member of GrGpuObjectGravatar bsalomon2014-07-22
| | | | | | | | | R=robertphillips@google.com TBR=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/413523002
* Add auto purging for SkPicture-related Ganesh resources (esp. layers)Gravatar robertphillips2014-07-22
| | | | | | | | | | This is intended to lower the bookkeeping burden for the Layer Caching feature. Cached layers are now automatically purged when a picture is deleted. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/408923002
* Make GrCacheable implement its own ref counting.Gravatar bsalomon2014-07-21
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/392333008
* Allow GrGLEffects to produce variable length keys.Gravatar bsalomon2014-07-21
| | | | | | | | R=robertphillips@google.com, jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/385713005
* Revert of Use the GrCacheable ID to eliminate the need for notifications to ↵Gravatar robertphillips2014-07-20
| | | | | | | | | | | | | | | | | | | | | | | GrGpuGL when textures and RTs are… (https://codereview.chromium.org/376703009/) Reason for revert: Trying to unblock roll wedged on 64 bit intrinsic call on XP Original issue's description: > Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL when textures and RTs are deleted. > > Also, rename GrCacheable::getGenerationID() to getInstanceID() since it doesn't behave like other "generation" IDs. > > Committed: https://skia.googlesource.com/skia/+/91bdbcdbbdf5cdf0fdb4518a0d30206c964cfdf6 R=jvanverth@google.com, bsalomon@google.com TBR=bsalomon@google.com, jvanverth@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/405023003
* Add IsPath to GrGLInterfaceGravatar cdalton2014-07-17
| | | | | | | | | | | This will be used by path ranges. BUG=skia: R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/403563002
* Use the GrCacheable ID to eliminate the need for notifications to GrGpuGL ↵Gravatar bsalomon2014-07-17
| | | | | | | | | | | | when textures and RTs are deleted. Also, rename GrCacheable::getGenerationID() to getInstanceID() since it doesn't behave like other "generation" IDs. R=jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/376703009
* Makes GrGLProgramDesc's key store the lengths as well as offsets of the ↵Gravatar bsalomon2014-07-17
| | | | | | | | | | | | | | | | effect keys. Makes it possible to use GrBackendEffectFactories other than GrTBEF by moving meta-key generation out of GrTBEF. Cleans up docs around GrBackendEffectFactory. Committed: https://skia.googlesource.com/skia/+/c0ea398aff8254e31152cbb94c9ab6150428e252 R=robertphillips@google.com, jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/379113004
* Add new ASTC pixel configGravatar krajcevski2014-07-16
| | | | | | | | R=bsalomon@google.com, robertphillips@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/399623004
* 32 bpp floating point texturesGravatar joshualitt2014-07-16
| | | | | | | | | | | This is VERY preliminary, but it was sufficient for me to get 32 bit floating point textures in a sample app BUG=skia: R=bsalomon@chromium.org, bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/359803003
* Revert of Makes GrGLProgramDesc's key store the lengths as well as offsets ↵Gravatar mtklein2014-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the effect keys. (https://codereview.chromium.org/379113004/) Reason for revert: Most likely candidate for Valgrind failures: [21:10:08.755668] ==3036== Use of uninitialised value of size 8 [21:10:08.755753] ==3036== at 0x734AB2: GrGpuGL::ProgramCache::getProgram(GrGLProgramDesc const&, GrEffectStage const**, GrEffectStage const**) (GrGpuGL_program.cpp:107) [21:10:08.755788] ==3036== by 0x734ED2: GrGpuGL::flushGraphicsState(GrGpu::DrawType, GrDeviceCoordTexture const*) (GrGpuGL_program.cpp:253) [21:10:08.755811] ==3036== by 0x6E81C2: GrGpu::setupClipAndFlushState(GrGpu::DrawType, GrDeviceCoordTexture const*, GrDrawState::AutoRestoreEffects*, SkRect const*) (GrGpu.cpp:350) [21:10:08.755837] ==3036== by 0x6E9BE8: GrGpu::onDraw(GrDrawTarget::DrawInfo const&) (GrGpu.cpp:390) [21:10:08.755858] ==3036== by 0x6EEECE: GrInOrderDrawBuffer::flush() (GrDrawTarget.h:506) [21:10:08.755879] ==3036== by 0x6D0EB4: GrContext::flush(int) (GrContext.cpp:1327) [21:10:08.755900] ==3036== by 0x6D3F8F: GrContext::writeTexturePixels(GrTexture*, int, int, int, int, GrPixelConfig, void const*, unsigned long, unsigned int) (GrContext.cpp:1349) [21:10:08.755922] ==3036== by 0x6D39D7: GrContext::writeRenderTargetPixels(GrRenderTarget*, int, int, int, int, GrPixelConfig, void const*, unsigned long, unsigned int) (GrContext.cpp:1632) [21:10:08.755949] ==3036== by 0x6FFDF3: GrRenderTarget::writePixels(int, int, int, int, GrPixelConfig, void const*, unsigned long, unsigned int) (GrRenderTarget.cpp:45) [21:10:08.755978] ==3036== by 0x735563: SkGpuDevice::onWritePixels(SkImageInfo const&, void const*, unsigned long, int, int) (SkGpuDevice.cpp:280) [21:10:08.756003] ==3036== by 0x57A048: SkBaseDevice::writePixels(SkImageInfo const&, void const*, unsigned long, int, int) (SkDevice.cpp:106) [21:10:08.756025] ==3036== by 0x56D0AE: SkCanvas::writePixels(SkImageInfo const&, void const*, unsigned long, int, int) (SkCanvas.cpp:700) [21:10:08.756050] ==3036== by 0x56D156: SkCanvas::writePixels(SkBitmap const&, int, int) (SkCanvas.cpp:652) [21:10:08.756077] ==3036== by 0x5109B6: test_WritePixels(skiatest::Reporter*, GrContextFactory*) (WritePixelsTest.cpp:464) [21:10:08.756099] ==3036== by 0x51114C: skiatest::WritePixelsClass::onRun(skiatest::Reporter*) (WritePixelsTest.cpp:361) [21:10:08.756122] ==3036== by 0x406BE8: skiatest::Test::run() (Test.cpp:107) [21:10:08.756145] ==3036== by 0x4064C2: SkTestRunnable::run() (skia_test.cpp:109) [21:10:08.756167] ==3036== by 0x405D1A: tool_main(int, char**) (skia_test.cpp:221) [21:10:08.756189] ==3036== by 0x405F75: main (skia_test.cpp:239) [21:10:08.756211] ==3036== Uninitialised value was created by a stack allocation [21:10:08.756233] ==3036== at 0x734CC8: GrGpuGL::flushGraphicsState(GrGpu::DrawType, GrDeviceCoordTexture const*) (GrGpuGL_program.cpp:213) Original issue's description: > Makes GrGLProgramDesc's key store the lengths as well as offsets of the effect keys. > > Makes it possible to use GrBackendEffectFactories other than GrTBEF by moving meta-key generation out of GrTBEF. > > Cleans up docs around GrBackendEffectFactory. > > Committed: https://skia.googlesource.com/skia/+/c0ea398aff8254e31152cbb94c9ab6150428e252 R=robertphillips@google.com, jvanverth@google.com, bsalomon@google.com TBR=bsalomon@google.com, jvanverth@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: mtklein@google.com Review URL: https://codereview.chromium.org/394213002
* Makes GrGLProgramDesc's key store the lengths as well as offsets of the ↵Gravatar bsalomon2014-07-15
| | | | | | | | | | | | | | effect keys. Makes it possible to use GrBackendEffectFactories other than GrTBEF by moving meta-key generation out of GrTBEF. Cleans up docs around GrBackendEffectFactory. R=robertphillips@google.com, jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/379113004
* remove SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE codeGravatar reed2014-07-14
| | | | | | | | TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/387313004
* Refactor SkGrFontScaler and SkGrFontKey into non-virtual versions.Gravatar jvanverth2014-07-11
| | | | | | | | | | | | | This is a pre-cleanup for another change, but has the side benefit of making the code simpler in general. No perf increase, despite removing virtual functions. R=bsalomon@google.com, egdaniel@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/385263002
* This moves us towards variable length effect keys. The overall program key ↵Gravatar bsalomon2014-07-11
| | | | | | | | | | now allows for it. After the header it stores an array of offsets to effect keys. This allows us to grab the effect keys to pass to effects when they generate code. It also ensures that we can't get a collision by sets of keys that are different lengths but are the same when appended together. R=robertphillips@google.com, jvanverth@google.com, egdaniel@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/356513003