aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ResourceCacheTest.cpp
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>
* Remove interal use of SkRefCnt_SafeAssign.Gravatar Ben Wagner2018-07-11
| | | | | | | | | | | | It turns out that SkDeviceProfile is no longer used and can just be deleted. The ResourceCacheTest and DebugGLTestContext are changed to use smart pointers where possible. This also clarifies the squirrelly part of the test. DebugGLTestContext is going away soon anyway. Change-Id: I95ef24afa58aa4d356429b93d4dec0d72e3fd827 Reviewed-on: https://skia-review.googlesource.com/140577 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ben Wagner <bungeman@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>
* Reland "Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines."Gravatar Ben Wagner2018-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ab17347df32807cabd9f2a518d22c3bd420e482f. Reason for revert: Chromium should now be ok. Original change's description: > Revert "Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines." > > This reverts commit e1bc7de7c07686b28b00b850e44e0722189f3592. > > Reason for revert: chrome used it > > Original change's description: > > Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines. > > > > sed 's/SK_MaxSizeT/SIZE_MAX/g' > > sed 's/SK_MaxU32/UINT32_MAX/g' > > sed 's/SK_MaxU16/UINT16_MAX/g' > > > > SK_MinU32 and SK_MinU16 were unused > > > > Change-Id: I6b6c824df47b05bde7e73b13a58e851a5f63fe0e > > Reviewed-on: https://skia-review.googlesource.com/134607 > > Commit-Queue: Hal Canary <halcanary@google.com> > > Reviewed-by: Ben Wagner <bungeman@google.com> > > TBR=halcanary@google.com,bungeman@google.com,reed@google.com > > Change-Id: I1e2c440dcf9f59bf87c1fea113248cd5136f7519 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/134921 > Reviewed-by: Hal Canary <halcanary@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux-ozone-rel TBR=halcanary@google.com,bungeman@google.com,reed@google.com Change-Id: I7709f9715bea0463b85b5b0a89712ac1020fcddb Reviewed-on: https://skia-review.googlesource.com/135180 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Revert "Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines."Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e1bc7de7c07686b28b00b850e44e0722189f3592. Reason for revert: chrome used it Original change's description: > Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines. > > sed 's/SK_MaxSizeT/SIZE_MAX/g' > sed 's/SK_MaxU32/UINT32_MAX/g' > sed 's/SK_MaxU16/UINT16_MAX/g' > > SK_MinU32 and SK_MinU16 were unused > > Change-Id: I6b6c824df47b05bde7e73b13a58e851a5f63fe0e > Reviewed-on: https://skia-review.googlesource.com/134607 > Commit-Queue: Hal Canary <halcanary@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> TBR=halcanary@google.com,bungeman@google.com,reed@google.com Change-Id: I1e2c440dcf9f59bf87c1fea113248cd5136f7519 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/134921 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines.Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | sed 's/SK_MaxSizeT/SIZE_MAX/g' sed 's/SK_MaxU32/UINT32_MAX/g' sed 's/SK_MaxU16/UINT16_MAX/g' SK_MinU32 and SK_MinU16 were unused Change-Id: I6b6c824df47b05bde7e73b13a58e851a5f63fe0e Reviewed-on: https://skia-review.googlesource.com/134607 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Remove unused code that was used for late mip allocations.Gravatar Greg Daniel2018-06-13
| | | | | | | | | | | This also includes removing code to support changing GrGpuResource's size since we now have to way to ever change the size. Bug: skia: Change-Id: Id27a8bc3cc94f5b954beda528b209727ede10ef6 Reviewed-on: https://skia-review.googlesource.com/134503 Commit-Queue: Greg Daniel <egdaniel@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>
* 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>
* Add new GrResourceCache::purgeUnlockedResources variantGravatar Robert Phillips2018-03-28
| | | | | | | | | TBR=bsalomon@google.com Change-Id: I05bef1f8a271474db878a046cc1f6ac7b60a15f1 Reviewed-on: https://skia-review.googlesource.com/116801 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Alter GrSurface/GrSurfaceProxy flags to prepare for GrTexture/GrTextureProxy ↵Gravatar Robert Phillips2018-03-19
| | | | | | | | | | | | | | | | -specific flags This CL: moves GrRenderTarget::fFlags to GrSurface::fSurfaceFlags adds a GrInternalSurfaceFlags type and uses it for GrSurfaceProxy::fSurfaceFlags The goal of this is to provide a location where GrTexture/GrTextureProxy-specific flags (i.e., isExternal & isRectangle) can be stored. Change-Id: I8df7b79036a6853dd378ff6cf10d4b37c60dd511 Reviewed-on: https://skia-review.googlesource.com/114796 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make GrGpu::deleteTestingOnlyBackendTexture() take const GrBackendTexture&Gravatar Brian Salomon2018-03-09
| | | | | | | Change-Id: Ibd00d0dc6d8c73628f26851e102defdbafab149b Reviewed-on: https://skia-review.googlesource.com/113164 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove abandon param from GrGpu::deleteTestingOnlyBackendTexture.Gravatar Brian Salomon2018-03-07
| | | | | | | | | Prior to the existence of GrBackendTexture this was required to delete a backend-specific blob. Now it's a no-op. Change-Id: Iba0e4233e4d07235626f0ae14b0f7e77c073d8c0 Reviewed-on: https://skia-review.googlesource.com/112569 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* 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>
* Remove unused code resulted from deleting DeferredTextureImageGravatar Greg Daniel2018-02-10
| | | | | | | | Bug: skia: Change-Id: Iaedc09880bd6a2d8fda4ce52f1644a944dd72605 Reviewed-on: https://skia-review.googlesource.com/106266 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Revert "Revert "Revert "Revert "Redefine the meaning of ↵Gravatar Brian Salomon2018-02-03
| | | | | | | | | | | | | sample counts in GPU backend."""""" This reverts commit 3a2cc2c2ec124de36d2544b2a523ef1dd317ca32. Fix code with samplecnt=0 that slipped in between trybots/CQ and landing of previous version Change-Id: Iab19f2e8d1e9901601c8c76244d7a88c5d707fab Reviewed-on: https://skia-review.googlesource.com/103181 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample ↵Gravatar Brian Salomon2018-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | counts in GPU backend.""""" This reverts commit 5bb82cbecd740d21b92e8d2944280ab6eb6af7a6. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""" > > This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75. > > Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types" > > > Bug: skia: > Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947 > Reviewed-on: https://skia-review.googlesource.com/102940 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: Idee23be2f1719f0bdc9305043e95a2d589bee8d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/103220 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU ↵Gravatar Brian Salomon2018-02-02
| | | | | | | | | | | | | | | backend."""" This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75. Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types" Bug: skia: Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947 Reviewed-on: https://skia-review.googlesource.com/102940 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""Gravatar Brian Salomon2018-02-02
| | | | | | | | | | | | | | | | | | | | This reverts commit d0d7270fcc32546005b8e847df516cb11592cd30. Revert "More sample count cleanup:" This reverts commit d653cac70ed17983125ceed053138c09f1401846. Revert "Add new GrContext queries for imagability, surfacability, and max sample count of color types" This reverts commit 85ae7159c9c8a9186a4c7e74304eabb35bca9a79. Need to understand NVPR perf changes before relanding Change-Id: I0db075fb42438ef2a1f9885df184dce52892ac4b Reviewed-on: https://skia-review.googlesource.com/102780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* More sample count cleanup:Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | | | | | | | | rename getSampleCount -> getRenderTargetSampleCount because it will return 0 when a config is not renderable but *is* supported as a texture format. (Old name kept around until Chrome stops calling it) Add virtual GrCaps::maxRenderTargetSampleCount(GrPixelConfig). Devirtualize isConfigRenderable() and implement as maxRTSC != 0. Separate implementation for version with bool withMSAA param to be removed after Flutter is updated to no longer call. Consolidate various file static GrSurfaceDesc validators fns into GrCaps::validateSurfaceDesc(). Bug: skia: Change-Id: Ie30a291aa027e910df3bd90fac8518ccdb39e53f Reviewed-on: https://skia-review.googlesource.com/102141 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Redefine the meaning of sample counts in GPU backend.""Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | Fixes gpu config default samples to be 1 and updates config parsing test accordingly. This reverts commit c1ce2f7966babaae0deb150f93f1227ee5af9285. Bug: skia: Change-Id: I456973b1f52ced85a2011ea10fc49449bfc5846f Reviewed-on: https://skia-review.googlesource.com/102147 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Redefine the meaning of sample counts in GPU backend."Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 48825b11ad25c98b9a4884d5cc0edd4e290c4409. Reason for revert: nanobench Original change's description: > Redefine the meaning of sample counts in GPU backend. > > Old: 0 -> nonMSAA > 1+ -> MSAA > > New: > 0 -> error/unsupported > 1 -> nonMSAA > 2+ -> MSAA > > We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility: > > 1) SkSurface factories > 2) GrBackendRenderTarget constructors > 3) GrCaps::getSampleCnt()'s requestedCount parameter > > However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally. > > This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case. > > > Bug: skia: > Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33 > Reviewed-on: https://skia-review.googlesource.com/101560 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: Ic257619a8a5ee9ac15419ecf10259e42daed7f82 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/102662 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Redefine the meaning of sample counts in GPU backend.Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | Old: 0 -> nonMSAA 1+ -> MSAA New: 0 -> error/unsupported 1 -> nonMSAA 2+ -> MSAA We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility: 1) SkSurface factories 2) GrBackendRenderTarget constructors 3) GrCaps::getSampleCnt()'s requestedCount parameter However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally. This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case. Bug: skia: Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33 Reviewed-on: https://skia-review.googlesource.com/101560 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move more internal methods from GrContext to GrContextPriv (take 3)Gravatar Robert Phillips2018-01-22
| | | | | | | | Change-Id: Ied630e61cf95780bf85032867e6ce663e1ef9c2f Reviewed-on: https://skia-review.googlesource.com/98000 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Move more internal methods from GrContext to GrContextPriv (take 2)"Gravatar Leon Scroggins2018-01-20
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c22e50bd317fe3658445c04e18a6e319d746c510. Reason for revert: Speculative fix for Android roll Original change's description: > Move more internal methods from GrContext to GrContextPriv (take 2) > > Change-Id: I47108910517d61edeb52f82793d384fdb5605d45 > Reviewed-on: https://skia-review.googlesource.com/97241 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I3a77ac33c5f48529357cf9c683d5f4cacaa2379f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/97582 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Move more internal methods from GrContext to GrContextPriv (take 2)Gravatar Robert Phillips2018-01-19
| | | | | | | Change-Id: I47108910517d61edeb52f82793d384fdb5605d45 Reviewed-on: https://skia-review.googlesource.com/97241 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Move more internal methods from GrContext to GrContextPriv"Gravatar Hal Canary2018-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f440cecbfdf1910104f36aedd0e963da2ae8b6a8. Reason for revert: breaking android builds. Original change's description: > Move more internal methods from GrContext to GrContextPriv > > TBR=bsalomon@google.com > Change-Id: Ia8cf0e0d30451c69bc7a08215aafa6abe6e0ddbe > Reviewed-on: https://skia-review.googlesource.com/97080 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: If263f8161f0fbe3fc6ee8f34bb09e237705c3694 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/97200 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Move more internal methods from GrContext to GrContextPrivGravatar Robert Phillips2018-01-19
| | | | | | | | TBR=bsalomon@google.com Change-Id: Ia8cf0e0d30451c69bc7a08215aafa6abe6e0ddbe Reviewed-on: https://skia-review.googlesource.com/97080 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Move resourceProvider accessor to GrContextPriv (take 2)Gravatar Robert Phillips2018-01-16
| | | | | | | | TBR=bsalomon@google.com Change-Id: I3fd46ebfad0d04b8a2bfa6190f81308f3a6be620 Reviewed-on: https://skia-review.googlesource.com/95121 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Move resourceProvider accessor to GrContextPriv"Gravatar Hal Canary2018-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1f9ed8501b0007846b3032f4bfc38aee98c175a1. Reason for revert: 1. breaking android roll 2. breaking Build-Debian9-Clang-arm-Release-Android_API26 Original change's description: > Move resourceProvider accessor to GrContextPriv > > Change-Id: I5cddd620a7ec4b006b7359864ede58e9d4dd684e > Reviewed-on: https://skia-review.googlesource.com/94340 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I20b2d267c0925f20453b635663654967199a1197 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/94964 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Move resourceProvider accessor to GrContextPrivGravatar Robert Phillips2018-01-16
| | | | | | | | Change-Id: I5cddd620a7ec4b006b7359864ede58e9d4dd684e Reviewed-on: https://skia-review.googlesource.com/94340 Reviewed-by: Brian Salomon <bsalomon@google.com> 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 valid checks in places we query isTestingOnlyBackendTextureGravatar Greg Daniel2018-01-10
| | | | | | | | Bug: skia:7477 Change-Id: I410427f12c7bb85d11a5e4ed1f09bbd80bbbb54c Reviewed-on: https://skia-review.googlesource.com/93000 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Osman <brianosman@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 GrBackendObject from tests (except image_from_yuv_textures)Gravatar Robert Phillips2017-12-12
| | | | | | | | | This sets the stage for landing https://skia-review.googlesource.com/c/skia/+/82823 (Update SkImage::MakeFromYUVTexturesCopy to GrBackendTexture) Change-Id: I2c62f23dc447b9ad55c0b5f06bcd6d7ca0ec4d2b Reviewed-on: https://skia-review.googlesource.com/83920 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@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>
* Revert "Revert "Fix GrDefaultPathRender inversely wound path bug""Gravatar Robert Phillips2017-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fc28138c0422637741ac2839914ef10c56438054. Reason for revert: Suppression have landed for failing tests Original change's description: > Revert "Fix GrDefaultPathRender inversely wound path bug" > > This reverts commit 511a9d49998ec6a74c375e6cfc55f660f7987c40. > > Reason for revert: vulkan > > Original change's description: > > Fix GrDefaultPathRender inversely wound path bug > > > > Bug: 769898 > > Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56 > > Reviewed-on: https://skia-review.googlesource.com/64065 > > Commit-Queue: Robert Phillips <robertphillips@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,robertphillips@google.com > > Change-Id: Ib1a987294d14f0526bf5ff5a8fd90bbd5f6f3a0d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 769898 > Reviewed-on: https://skia-review.googlesource.com/65201 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I3a3543c46b3192f1ffd31a5566cf337dc03561a8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 769898 Reviewed-on: https://skia-review.googlesource.com/65202 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Fix GrDefaultPathRender inversely wound path bug"Gravatar Robert Phillips2017-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 511a9d49998ec6a74c375e6cfc55f660f7987c40. Reason for revert: vulkan Original change's description: > Fix GrDefaultPathRender inversely wound path bug > > Bug: 769898 > Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56 > Reviewed-on: https://skia-review.googlesource.com/64065 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Ib1a987294d14f0526bf5ff5a8fd90bbd5f6f3a0d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 769898 Reviewed-on: https://skia-review.googlesource.com/65201 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix GrDefaultPathRender inversely wound path bugGravatar Robert Phillips2017-10-30
| | | | | | | | Bug: 769898 Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56 Reviewed-on: https://skia-review.googlesource.com/64065 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add flag on GrBackendTexture to say whether texture is mipped or notGravatar Greg Daniel2017-10-12
| | | | | | | | Bug: skia: Change-Id: Ia684e3daf779ec2feaaec64c04dabf5cb03cd07a Reviewed-on: https://skia-review.googlesource.com/57821 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Mike Reed2017-10-03
| | | | | | | | | | This reverts commit 5a2e50edc51006ce91366e177a9d21a16775d7fd. Bug: skia: Change-Id: I8d28b5c07d90130e5a1653923740eaf189ecb954 Reviewed-on: https://skia-review.googlesource.com/53900 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "guard old apis for querying byte-size of a ↵Gravatar Mike Reed2017-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bitmap/imageinfo/pixmap""" This reverts commit cd284c532376d16fcc4ed75baf3da65c3e4a2e95. Reason for revert: assert fired in SkMallocPixelRef.cpp:61: fatal error: "assert(info.computeByteSize(rowBytes) == info.getSafeSize(rowBytes))" google3 thinks it was from surface_rowbytes Original change's description: > Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"" > > This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0. > > Bug: skia: > Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d > Reviewed-on: https://skia-review.googlesource.com/52665 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> TBR=fmalita@chromium.org,reed@google.com Change-Id: I41e3f7a3f791cc8183291847e783ed8a53bc91d2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/53802 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "guard old apis for querying byte-size of a ↵Gravatar Mike Reed2017-10-02
| | | | | | | | | | | | bitmap/imageinfo/pixmap"" This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0. Bug: skia: Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d Reviewed-on: https://skia-review.googlesource.com/52665 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Jim Van Verth2017-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 88757dacd4f532a0f647c02ae0ee596d31ab5c68. Reason for revert: Still seems to be failing Chromium "telemetry_perf_unittests (with patch) on Android" on android_n5x_swarming_rel. Original change's description: > guard old apis for querying byte-size of a bitmap/imageinfo/pixmap > > Now with legacy behavior for allocpixels > > This was reverted, so the current CL is a "fix" on top of ... > https://skia-review.googlesource.com/c/skia/+/50980 > > Related update to Chrome (in preparation for this change) > https://chromium-review.googlesource.com/c/chromium/src/+/685719 > > Bug: skia: > Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9 > Reviewed-on: https://skia-review.googlesource.com/51341 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> TBR=fmalita@chromium.org,reed@google.com Change-Id: I827a0ca1d1e3909e648fde3342cdb8601d34da8d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/52381 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* guard old apis for querying byte-size of a bitmap/imageinfo/pixmapGravatar Mike Reed2017-09-27
| | | | | | | | | | | | | | | | Now with legacy behavior for allocpixels This was reverted, so the current CL is a "fix" on top of ... https://skia-review.googlesource.com/c/skia/+/50980 Related update to Chrome (in preparation for this change) https://chromium-review.googlesource.com/c/chromium/src/+/685719 Bug: skia: Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9 Reviewed-on: https://skia-review.googlesource.com/51341 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Greg Daniel2017-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98a6216b18b57c2f7a0d58f542c60503686aed69. Reason for revert: breaking the chrome roll. Looks like they may be writing data to create an image across all the row bytes and thus writing to unalloced data on the last row. Link to example failing bot: https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/539960 Original change's description: > guard old apis for querying byte-size of a bitmap/imageinfo/pixmap > > Previously we had size_t and uint64_t variations. > > The new (simpler) API always.. > - returns size_t, or 0 if the calculation overflowed > - returns the trimmed size (does not include rowBytes padding for the last row) > > Bug: skia: > Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e > Reviewed-on: https://skia-review.googlesource.com/50980 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Leon Scroggins <scroggo@google.com> TBR=mtklein@google.com,herb@google.com,scroggo@google.com,fmalita@chromium.org,reed@google.com Change-Id: I726f6ab1b36b14979ba6f37105e0a469b3f0dbc0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/51262 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Remove fIsMipMapped from GrSurfaceDescGravatar Greg Daniel2017-09-26
| | | | | | | | | | | Part 3 of 3 for relanding of https://skia-review.googlesource.com/c/skia/+/42083 Bug: skia: Change-Id: I98c5406015213df5d11a0101df8722da6845157e Reviewed-on: https://skia-review.googlesource.com/44464 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>