diff options
author | Derek Sollenberger <djsollen@google.com> | 2018-03-29 13:40:02 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-29 18:08:15 +0000 |
commit | cf6da8c0f29877249a55949efd8b952b5b9bc01d (patch) | |
tree | 9f4bcd3033dd85d378da916e7f45ab583524c595 /src/gpu/GrSoftwarePathRenderer.cpp | |
parent | 9c6f6a52764281f6c61c2daf21f4737df5df53c7 (diff) |
Dump additional details about the gpu resources.
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>
Diffstat (limited to 'src/gpu/GrSoftwarePathRenderer.cpp')
-rw-r--r-- | src/gpu/GrSoftwarePathRenderer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp index 228625f4fb..15ea55d4f2 100644 --- a/src/gpu/GrSoftwarePathRenderer.cpp +++ b/src/gpu/GrSoftwarePathRenderer.cpp @@ -290,14 +290,16 @@ bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) { // Fractional translate does not affect caching on Android. This is done for better cache // hit ratio and speed, but it is matching HWUI behavior, which doesn't consider the matrix // at all when caching paths. - GrUniqueKey::Builder builder(&maskKey, kDomain, 4 + args.fShape->unstyledKeySize()); + GrUniqueKey::Builder builder(&maskKey, kDomain, 4 + args.fShape->unstyledKeySize(), + "SW Path Mask"); #else SkScalar tx = args.fViewMatrix->get(SkMatrix::kMTransX); SkScalar ty = args.fViewMatrix->get(SkMatrix::kMTransY); // Allow 8 bits each in x and y of subpixel positioning. SkFixed fracX = SkScalarToFixed(SkScalarFraction(tx)) & 0x0000FF00; SkFixed fracY = SkScalarToFixed(SkScalarFraction(ty)) & 0x0000FF00; - GrUniqueKey::Builder builder(&maskKey, kDomain, 5 + args.fShape->unstyledKeySize()); + GrUniqueKey::Builder builder(&maskKey, kDomain, 5 + args.fShape->unstyledKeySize(), + "SW Path Mask"); #endif builder[0] = SkFloat2Bits(sx); builder[1] = SkFloat2Bits(sy); |