diff options
author | Robert Phillips <robertphillips@google.com> | 2018-04-04 15:54:55 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-04 20:34:28 +0000 |
commit | c5509955b98daa0643da7fcd7ad356a9aa5a42da (patch) | |
tree | b8f9628b518b8efb5c4de5fd566ca4cc10be7b07 /include/gpu/mock | |
parent | 1fda0247a77e5c7af57163750a3f7a04fddffdd5 (diff) |
Add GrBackendTexture accessor to SkImage (take 2)
This makes accessing the GPU resource behind an SkImage a lot more typesafe. Additionally, the GrBackendObject is being deprecated so this is the path forward.
I split the controversial stuff off into https://skia-review.googlesource.com/c/skia/+/118575 (Add SkImage::setLayout call).
Change-Id: I297e72770e8fb360fac7c7cd74f050ae759ae133
Reviewed-on: https://skia-review.googlesource.com/118571
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/gpu/mock')
-rw-r--r-- | include/gpu/mock/GrMockTypes.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/gpu/mock/GrMockTypes.h b/include/gpu/mock/GrMockTypes.h index 6e38175838..5ca0730956 100644 --- a/include/gpu/mock/GrMockTypes.h +++ b/include/gpu/mock/GrMockTypes.h @@ -14,11 +14,19 @@ struct GrMockTextureInfo { GrPixelConfig fConfig; int fID; + + bool operator==(const GrMockTextureInfo& that) const { + return fConfig == that.fConfig && fID == that.fID; + } }; struct GrMockRenderTargetInfo { GrPixelConfig fConfig; int fID; + + bool operator==(const GrMockRenderTargetInfo& that) const { + return fConfig == that.fConfig && fID == that.fID; + } }; /** |