From 11606ffa364a5f99b892c550c750e482133a9f45 Mon Sep 17 00:00:00 2001 From: Stan Iliev Date: Mon, 17 Sep 2018 14:01:16 -0400 Subject: Implement WebView support for Vulkan using temporary buffer Draw WebView in an offscreen GL buffer, then import and draw the buffer with Vulkan. Bug: 115610873 Test: Passed WebView CTS tests that are part of UiRendering. Change-Id: Ida137fe9b8652d2a936ec2798b909be7e77b3462 --- libs/hwui/HardwareBitmapUploader.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'libs/hwui/HardwareBitmapUploader.cpp') diff --git a/libs/hwui/HardwareBitmapUploader.cpp b/libs/hwui/HardwareBitmapUploader.cpp index ab80d3d98448..7dbef65f10cb 100644 --- a/libs/hwui/HardwareBitmapUploader.cpp +++ b/libs/hwui/HardwareBitmapUploader.cpp @@ -107,39 +107,6 @@ static bool hasFP16Support() { #define FENCE_TIMEOUT 2000000000 -class AutoEglImage { -public: - AutoEglImage(EGLDisplay display, EGLClientBuffer clientBuffer) : mDisplay(display) { - EGLint imageAttrs[] = {EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE}; - image = eglCreateImageKHR(display, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID, clientBuffer, - imageAttrs); - } - - ~AutoEglImage() { - if (image != EGL_NO_IMAGE_KHR) { - eglDestroyImageKHR(mDisplay, image); - } - } - - EGLImageKHR image = EGL_NO_IMAGE_KHR; - -private: - EGLDisplay mDisplay = EGL_NO_DISPLAY; -}; - -class AutoSkiaGlTexture { -public: - AutoSkiaGlTexture() { - glGenTextures(1, &mTexture); - glBindTexture(GL_TEXTURE_2D, mTexture); - } - - ~AutoSkiaGlTexture() { glDeleteTextures(1, &mTexture); } - -private: - GLuint mTexture = 0; -}; - struct FormatInfo { PixelFormat pixelFormat; GLint format, type; -- cgit v1.2.3-59-g8ed1b