Add support for hardware buffers with protected content
Use EGL_EXT_protected_content extension if present to render
AHardwareBuffer with AHARDWAREBUFFER_USAGE_PROTECTED_CONTENT.
Bug: skia:
Change-Id: I1a5fa4cdc8f432b89ae9ef889175b50a25b846e0
Reviewed-on: https://skia-review.googlesource.com/149803
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
diff --git a/src/gpu/GrAHardwareBufferImageGenerator.h b/src/gpu/GrAHardwareBufferImageGenerator.h
index 58b5abf..3c6f678 100644
--- a/src/gpu/GrAHardwareBufferImageGenerator.h
+++ b/src/gpu/GrAHardwareBufferImageGenerator.h
@@ -47,7 +47,8 @@
bool willNeedMipMaps) override;
private:
- GrAHardwareBufferImageGenerator(const SkImageInfo&, AHardwareBuffer*, SkAlphaType);
+ GrAHardwareBufferImageGenerator(const SkImageInfo&, AHardwareBuffer*, SkAlphaType,
+ bool isProtectedContent);
void makeProxy(GrContext* context);
void releaseTextureRef();
@@ -63,6 +64,7 @@
uint32_t fOwningContextID = SK_InvalidGenID;
sk_sp<GrTextureProxy> fCachedProxy;
+ const bool fIsProtectedContent;
typedef SkImageGenerator INHERITED;
};