Add support for dummy draws for Vulkan webview and texture views.
Test: manual testing
Change-Id: Iaec8c3a34367673c281665ff6c6e97d1ce532265
diff --git a/libs/hwui/VkLayer.h b/libs/hwui/VkLayer.h
index 353939f..39522b3 100644
--- a/libs/hwui/VkLayer.h
+++ b/libs/hwui/VkLayer.h
@@ -18,7 +18,7 @@
#include "Layer.h"
-#include <SkSurface.h>
+#include <SkImage.h>
namespace android {
namespace uirenderer {
@@ -53,16 +53,22 @@
return mBlend;
}
- sk_sp<SkSurface> getSurface() {
- return mSurface;
+ sk_sp<SkImage> getImage() {
+ return mImage;
}
+ void updateTexture();
+
+ // If we've destroyed the vulkan context (VkInstance, VkDevice, etc.), we must make sure to
+ // destroy any VkImages that were made with that context.
+ void onVkContextDestroyed();
+
private:
int mWidth;
int mHeight;
bool mBlend;
- sk_sp<SkSurface> mSurface;
+ sk_sp<SkImage> mImage;
}; // struct VkLayer