aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrResourceKey.h
Commit message (Collapse)AuthorAge
* Reland "Make GPU cache invalidation SkMessageBus messages go to one GrContext."Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of f4c5bb9aba485aa47c27b15905d81992b7cf4707 Original change's description: > Make GPU cache invalidation SkMessageBus messages go to one GrContext. > > Makes it so the template param to SkMessageBus must implement: > bool shouldSend(uint32_t inboxID) const > > Updates all GPU backend message types to only go to the GrContext that > is adding a cache entry. > > Bug: skia: > Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 > Reviewed-on: https://skia-review.googlesource.com/140220 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> Bug: skia: Change-Id: I8402bfe3ed0170c99936d47050458817030b473b Reviewed-on: https://skia-review.googlesource.com/140801 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Make GPU cache invalidation SkMessageBus messages go to one GrContext."Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f4c5bb9aba485aa47c27b15905d81992b7cf4707. Reason for revert: Accidentally submitted without CQ Original change's description: > Make GPU cache invalidation SkMessageBus messages go to one GrContext. > > Makes it so the template param to SkMessageBus must implement: > bool shouldSend(uint32_t inboxID) const > > Updates all GPU backend message types to only go to the GrContext that > is adding a cache entry. > > Bug: skia: > Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 > Reviewed-on: https://skia-review.googlesource.com/140220 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Iadb667d8027341703d254325320ddaa528fb33a1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/140800 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make GPU cache invalidation SkMessageBus messages go to one GrContext.Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | Makes it so the template param to SkMessageBus must implement: bool shouldSend(uint32_t inboxID) const Updates all GPU backend message types to only go to the GrContext that is adding a cache entry. Bug: skia: Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 Reviewed-on: https://skia-review.googlesource.com/140220 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* trim #include <new> from SkPostConfig.hGravatar Mike Klein2018-06-11
| | | | | | | Change-Id: I693ddcd4ade101ba4eb4102e03adce183aa1d672 Reviewed-on: https://skia-review.googlesource.com/133829 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Dump additional details about the gpu resources.Gravatar Derek Sollenberger2018-03-29
| | | | | | | | | | | | | | | | | GpuResources now dump optional string values that describe the type and category of the resource. The type provides a description of the kind of resource it is (e.g. texture, buffer object, stencil, etc.) and the category describes what the resource is currently tasked to do (e.g. path masks, images, scratch, etc.) This CL also refactors the dump logic in an attempt to consolidate duplicated code into GrGpuResources.cpp. Bug: b/74435803 Change-Id: I83cae825f41e6450a21398ab3ecea349c7c61c15 Reviewed-on: https://skia-review.googlesource.com/115989 Commit-Queue: Derek Sollenberger <djsollen@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Convert NULL and 0 to nullptr.Gravatar Ben Wagner2017-08-28
| | | | | | | | | | | | | | This was created by looking at warnings produced by clang's -Wzero-as-null-pointer-constant. This updates most issues in Skia code. However, there are places where GL and Vulkan want pointer values which are explicitly 0, external headers which use NULL directly, and possibly more uses in un-compiled sources (for other platforms). Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345 Reviewed-on: https://skia-review.googlesource.com/39521 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* increase Builder's prealloc size after colorspace changeGravatar Mike Reed2017-03-10
| | | | | | | | | BUG=skia: Change-Id: I003dcbde7d987404ae823df6621e13664cf440a1 Reviewed-on: https://skia-review.googlesource.com/9523 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add support for tagging GrUniqueKeys with a debug stringGravatar Brian Salomon2017-01-06
| | | | | | | 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>
* Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.Gravatar bungeman2016-08-02
| | | | | | | This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004 Review-Url: https://codereview.chromium.org/2206633004
* Modernize and trim down SkOnce.Gravatar mtklein2016-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | The API and implementation are very much simplified. You may not want to bother reading the diff. As is our trend, SkOnce now uses <atomic> directly. Member initialization means we don't need SK_DECLARE_STATIC_ONCE. SkSpinlock already works this same way. All uses of the old API taking an external bool* and Lock* were pessimal, so I have not carried this sort of API forward. It's simpler, faster, and more space-efficient to always use this single SkOnce class interface. SkOnce weighs 2 bytes: a done bool and an SkSpinlock, also a bool internally. This API refactoring opens up the opportunity to fuse those into a single three-state byte if we'd like. No public API changes. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1894893002 Review URL: https://codereview.chromium.org/1894893002
* Fix thread-unsafe construction of GrUniqueKey in GR_DEFINE_STATIC_UNIQUE_KEYGravatar bsalomon2015-12-17
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530313002 Review URL: https://codereview.chromium.org/1530313002
* Rewrite GrTextureMaker to disentangle bitmap case from base class and give ↵Gravatar bsalomon2015-10-20
| | | | | | | | | | GPU object a say in what copying needs to be done. Committed: https://skia.googlesource.com/skia/+/fcffaf22d697f06f903c3193308f9dc54a959f79 Committed: https://skia.googlesource.com/skia/+/1a197ea31e0aac7ea312e9a6c0d9f5df626b0350 Review URL: https://codereview.chromium.org/1409163002
* Revert recent CLs around GrTextureMaker/GrTextureParamsAdjusterGravatar Brian Salomon2015-10-19
| | | | Review URL: https://codereview.chromium.org/1411353002 .
* Rewrite GrTextureMaker to disentangle bitmap case from base class and give ↵Gravatar bsalomon2015-10-19
| | | | | | | | GPU object a say in what copying needs to be done. Committed: https://skia.googlesource.com/skia/+/fcffaf22d697f06f903c3193308f9dc54a959f79 Review URL: https://codereview.chromium.org/1409163002
* Revert of Rewrite GrTextureMaker to disentangle bitmap case from base class ↵Gravatar egdaniel2015-10-16
| | | | | | | | | | | | | | | | | | | and give GPU object a say in what… (patchset #4 id:60001 of https://codereview.chromium.org/1409163002/ ) Reason for revert: breaking nanobench Original issue's description: > Rewrite GrTextureMaker to disentangle bitmap case from base class and give GPU object a say in what copying needs to be done. > > Committed: https://skia.googlesource.com/skia/+/fcffaf22d697f06f903c3193308f9dc54a959f79 TBR=reed@google.com,bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1409923003
* Rewrite GrTextureMaker to disentangle bitmap case from base class and give ↵Gravatar bsalomon2015-10-16
| | | | | | GPU object a say in what copying needs to be done. Review URL: https://codereview.chromium.org/1409163002
* Move Mutexy things to private.Gravatar herb2015-09-29
| | | | | | | | | | There is no API change. TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/1368333004
* Move SkTemplates.h to private.Gravatar bungeman2015-08-19
| | | | | | | | SkTemplates.h contains a number of Skia specific utilities which are not designed for external use. In addition to reducing the external support burden, this will allow Skia to freely refactor this file. Review URL: https://codereview.chromium.org/1272293004
* Implement caching of filled paths in the tessellated path renderer.Gravatar senorblanco2015-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached. Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold. In order to invalidate the cache when an SkPath is changed or deleted, this required implementing genID change notification in SkPath. This is modelled almost exactly on SkPixelRef::GenIDChangeListener. However, It does not currently implement the check for unique genIDs, so notifiers will fire when the first instance of an SkPathRef using a given genID is destroyed. Another caveat is that you cannot successfully add a change notifier to an empty path, since it uses the "canonical" empty path which is never modified or destroyed. For this reason, we prevent adding listeners to it. BUG=skia:4121,skia:4122, 497403 DOCS_PREVIEW= https://skia.org/?cl=1114353004 Committed: https://skia.googlesource.com/skia/+/468dfa72eb6694145487be17876804dfca3b7adb Review URL: https://codereview.chromium.org/1114353004
* Revert "Implement caching of filled paths in the tessellated path renderer."Gravatar mtklein2015-08-04
| | | | | | | | | | | | | | | | | | This reverts commit 468dfa72eb6694145487be17876804dfca3b7adb. This CL caused signficant GM diffs. Revert "Fix resource cache test." This reverts commit b001c41ed37d2018d38ce787b412ed741585d75d. Revert "Fix SkData leaks at GrResourceKey::setCustomData() call sites." This reverts commit c369348aa596d7be05c9ce0ca5d349e5d1903789. These CLs depend on the first one. BUG=skia: TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1260363007
* Implement caching of filled paths in the tessellated path renderer.Gravatar senorblanco2015-08-03
| | | | | | | | | | | | | | | | | | | | | | | Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached. Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold. In order to invalidate the cache when an SkPath is changed or deleted, this required implementing genID change notification in SkPath. This is modelled almost exactly on SkPixelRef::GenIDChangeListener. However, It does not currently implement the check for unique genIDs, so notifiers will fire when the first instance of an SkPathRef using a given genID is destroyed. Another caveat is that you cannot successfully add a change notifier to an empty path, since it uses the "canonical" empty path which is never modified or destroyed. For this reason, we prevent adding listeners to it. BUG=skia:4121,skia:4122, 497403 DOCS_PREVIEW= https://skia.org/?cl=1114353004 Review URL: https://codereview.chromium.org/1114353004
* Make GrResourceCache perf less sensitive to key length changeGravatar kkinnunen2015-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make GrResourceCache performance less sensitive to key length change. The memcmp in GrResourceKey is called when SkTDynamicHash jumps the slots to find the hash by a index. Avoid most of the memcmps by comparing the hash first. This is important because small changes in key data length can cause big performance regressions. The theory is that key length change causes different hash values. These hash values might trigger memcmps that originally weren't there, causing the regression. Adds few specialized benches to grresourcecache_add to test different key lengths. The tests are run only on release, because on debug the SkTDynamicHash validation takes too long, and adding many such delays to development test runs would be unproductive. On release the tests are quite fast. Effect of this patch to the added tests on amd64: grresourcecache_find_10 738us -> 768us 1.04x grresourcecache_find_2 472us -> 476us 1.01x grresourcecache_find_25 841us -> 845us 1x grresourcecache_find_4 565us -> 531us 0.94x grresourcecache_find_54 1.18ms -> 1.1ms 0.93x grresourcecache_find_5 834us -> 749us 0.9x grresourcecache_find_3 620us -> 542us 0.87x grresourcecache_add_25 2.74ms -> 2.24ms 0.82x grresourcecache_add_56 3.23ms -> 2.56ms 0.79x grresourcecache_add_54 3.34ms -> 2.62ms 0.78x grresourcecache_add_5 2.68ms -> 2.1ms 0.78x grresourcecache_add_10 2.7ms -> 2.11ms 0.78x grresourcecache_add_2 1.85ms -> 1.41ms 0.76x grresourcecache_add 1.84ms -> 1.4ms 0.76x grresourcecache_add_4 1.99ms -> 1.49ms 0.75x grresourcecache_add_3 2.11ms -> 1.55ms 0.73x grresourcecache_add_55 39ms -> 13.9ms 0.36x grresourcecache_find_55 23.2ms -> 6.21ms 0.27x On arm64 the results are similar. On arm_v7_neon, the results lack the discontinuity at 55: grresourcecache_add 4.06ms -> 4.26ms 1.05x grresourcecache_add_2 4.05ms -> 4.23ms 1.05x grresourcecache_find 1.28ms -> 1.3ms 1.02x grresourcecache_find_56 3.35ms -> 3.32ms 0.99x grresourcecache_find_2 1.31ms -> 1.29ms 0.99x grresourcecache_find_54 3.28ms -> 3.24ms 0.99x grresourcecache_add_5 6.38ms -> 6.26ms 0.98x grresourcecache_add_55 8.44ms -> 8.24ms 0.98x grresourcecache_add_25 7.03ms -> 6.86ms 0.98x grresourcecache_find_25 2.7ms -> 2.59ms 0.96x grresourcecache_find_4 1.45ms -> 1.38ms 0.95x grresourcecache_find_10 2.52ms -> 2.39ms 0.95x grresourcecache_find_55 3.54ms -> 3.33ms 0.94x grresourcecache_find_5 2.5ms -> 2.32ms 0.93x grresourcecache_find_3 1.57ms -> 1.43ms 0.91x The extremely slow case, 55, is postulated to be due to the index jump collisions running the memcmp. This is not visible on arm_v7_neon probably due to hash function producing different results for 32 bit architectures. This change is needed for extending path cache key in Gr NV_path_rendering codepath. Extending is needed in order to add dashed paths to the path cache. Review URL: https://codereview.chromium.org/1132723003
* Move instanced index buffer creation to flush timeGravatar bsalomon2015-05-04
| | | | | | Committed: https://skia.googlesource.com/skia/+/ab622c7b8cc8c39f0a594e4392b9e31b7e1ddb26 Review URL: https://codereview.chromium.org/1116943004
* Revert of Move instanced index buffer creation to flush time (patchset #6 ↵Gravatar bsalomon2015-05-04
| | | | | | | | | | | | | | | | | | | id:100001 of https://codereview.chromium.org/1116943004/) Reason for revert: messed up caching, recreating index buffers all the time. Original issue's description: > Move instanced index buffer creation to flush time > > Committed: https://skia.googlesource.com/skia/+/ab622c7b8cc8c39f0a594e4392b9e31b7e1ddb26 TBR=joshualitt@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1126613003
* Move instanced index buffer creation to flush timeGravatar bsalomon2015-05-04
| | | | Review URL: https://codereview.chromium.org/1116943004
* Allow resources' unique keys to be changed.Gravatar bsalomon2015-02-19
| | | | Review URL: https://codereview.chromium.org/938943002
* Rename GrContentKey to GrUniqueKeyGravatar bsalomon2015-02-19
| | | | Review URL: https://codereview.chromium.org/940463006
* Use SkAutoSTMalloc in GrResourceKeyGravatar bsalomon2015-02-18
| | | | | | TBR=robertphillips@google.com Review URL: https://codereview.chromium.org/935863003
* Reimplement gpu message bus for invalidated bitmap gen IDsGravatar bsalomon2015-02-06
| | | | Review URL: https://codereview.chromium.org/902873002
* Move npot resizing out of GrContext and simplify GrContext texture functions.Gravatar bsalomon2015-02-02
| | | | | | | | Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54 Committed: https://skia.googlesource.com/skia/+/6c96672491b04cb782bce8fee778124df66524a0 Review URL: https://codereview.chromium.org/882223003
* Revert of Move npot resizing out of GrContext and simplify GrContext texture ↵Gravatar bsalomon2015-01-31
| | | | | | | | | | | | | | | | | | | | | functions. (patchset #10 id:200001 of https://codereview.chromium.org/882223003/) Reason for revert: perf fix didn't fix the cr webgl conformance tests Original issue's description: > Move npot resizing out of GrContext and simplify GrContext texture functions. > > Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54 > > Committed: https://skia.googlesource.com/skia/+/6c96672491b04cb782bce8fee778124df66524a0 TBR=robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/887303002
* Move npot resizing out of GrContext and simplify GrContext texture functions.Gravatar bsalomon2015-01-31
| | | | | | Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54 Review URL: https://codereview.chromium.org/882223003
* Revert of Move npot resizing out of GrContext and simplify GrContext texture ↵Gravatar fmalita2015-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | functions. (patchset #9 id:160001 of https://codereview.chromium.org/882223003/) Reason for revert: webGL conformance failures: WebglConformance.conformance_textures_tex_image_and_sub_image_2d_with_video WebglConformance.conformance_textures_texture_npot_video https://codereview.chromium.org/892773003/ http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/29272 Original issue's description: > Move npot resizing out of GrContext and simplify GrContext texture functions. > > Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54 TBR=robertphillips@google.com,bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/868233005
* Move npot resizing out of GrContext and simplify GrContext texture functions.Gravatar bsalomon2015-01-30
| | | | Review URL: https://codereview.chromium.org/882223003
* Fix wrapped content keys for npot textures.Gravatar bsalomon2015-01-28
| | | | Review URL: https://codereview.chromium.org/879193002
* Fix GPU resource cache related assertions.Gravatar bsalomon2015-01-27
| | | | Review URL: https://codereview.chromium.org/879963003
* Fix self assigment in GrResourceKeyGravatar bsalomon2015-01-23
| | | | | | | | TBR=robertphillips@google.com BUG=skia:3340 Review URL: https://codereview.chromium.org/866263007
* Remove GrBinHashKeyGravatar bsalomon2015-01-23
| | | | Review URL: https://codereview.chromium.org/861323002
* Add specialized content key class for resources.Gravatar bsalomon2015-01-23
| | | | Review URL: https://codereview.chromium.org/858123002
* Reland https://codereview.chromium.org/860333002 with fix for test failures.Gravatar bsalomon2015-01-21
| | | | | | | | | | Revert "Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 id:1 of https://codereview.chromium.org/860333002/)" This reverts commit 988018c817f341c0ce09297b7ba5ba60ba76eba9. BUG=skia: Review URL: https://codereview.chromium.org/863983003
* Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 ↵Gravatar mtklein2015-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:1 of https://codereview.chromium.org/860333002/) Reason for revert: Our Valgrind bot just spewed out a weird error. I don't know if it's related, but it looks at least like one of the stacks was in the right area, so I'm going to revert this precautionarily. Sorry if this is a false positive. http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/266/steps/dm/logs/stdio Original issue's description: > Make GrScratchKey memory buffer correct size on copy > > Scratch key memory buffer of a copy of a key was too big. The (new) copy > was N times uint32_t bytes instead of N bytes. > > Adds few tests to resource cache. These tests would not catch the too > big buffer. This is just a precaution for too small buffers. The main > idea of the test change is that the scratch key should contain some > information, so that lookup with a scratch key can also return no > match. Otherwise testing of scratch lookup result is not indicative of > correct code (eg. no-information scratch key will always match). > > Committed: https://skia.googlesource.com/skia/+/711ef4831363fb8cbdf061dc2c36c65b13c0ccf2 TBR=bsalomon@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/864833003
* Make GrScratchKey memory buffer correct size on copyGravatar kkinnunen2015-01-21
| | | | | | | | | | | | | | Scratch key memory buffer of a copy of a key was too big. The (new) copy was N times uint32_t bytes instead of N bytes. Adds few tests to resource cache. These tests would not catch the too big buffer. This is just a precaution for too small buffers. The main idea of the test change is that the scratch key should contain some information, so that lookup with a scratch key can also return no match. Otherwise testing of scratch lookup result is not indicative of correct code (eg. no-information scratch key will always match). Review URL: https://codereview.chromium.org/860333002
* Add a simpler key type for scratch resource keys.Gravatar bsalomon2014-12-30
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/815833004
* Move GrResourceKey static functions from .h to .cpp to fix shared lib buildsGravatar bsalomon2014-11-10
| | | | | | TBR=robertphillips@google.com Review URL: https://codereview.chromium.org/718493002
* Make textures register with GrResourceCache2 as scratch.Gravatar bsalomon2014-08-28
R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/510053003