diff options
author | 2024-08-30 13:43:34 -0400 | |
---|---|---|
committer | 2024-08-30 13:54:14 -0400 | |
commit | 572d801cca5d1b0289fe3d0038c875ebc8457352 (patch) | |
tree | 5600aac8aa40dffff692954130fed0c7020c0485 | |
parent | 1e45712b0a3a8b857e74fe77aaff37443f14933b (diff) |
[HWUI] Update Ganesh includes to specify new location
Upstream Skia changes I7269acfae5c26518c2a61930a8af9584682751cd and
Ibc927d0ae66a05546957300090a651614e720fad are moving Ganesh headers into
Skia's include/gpu/ganesh/ directory. Android's current includes are
relying on temporary shims which will soon be removed.
Note: I also sorted some includes to try and calm the chaos a tiny bit,
but didn't go out of my way to update all non-Ganesh Skia includes.
clang-format decided to further re-arrange things, so I'm hoping this
doesn't make future merge conflicts too painful.
Bug: 40044159
Test: builds after locally deleting Skia's temporary shims
Flag: EXEMPT refactor
Change-Id: I5099e215a58915a5e6c7b3434f9855006dda8c60
23 files changed, 57 insertions, 53 deletions
diff --git a/libs/hwui/AutoBackendTextureRelease.cpp b/libs/hwui/AutoBackendTextureRelease.cpp index 5f5ffe97e953..27add3542c01 100644 --- a/libs/hwui/AutoBackendTextureRelease.cpp +++ b/libs/hwui/AutoBackendTextureRelease.cpp @@ -17,11 +17,12 @@ #include "AutoBackendTextureRelease.h" #include <SkImage.h> -#include <include/gpu/ganesh/SkImageGanesh.h> -#include <include/gpu/GrDirectContext.h> -#include <include/gpu/GrBackendSurface.h> #include <include/gpu/MutableTextureState.h> +#include <include/gpu/ganesh/GrBackendSurface.h> +#include <include/gpu/ganesh/GrDirectContext.h> +#include <include/gpu/ganesh/SkImageGanesh.h> #include <include/gpu/vk/VulkanMutableTextureState.h> + #include "renderthread/RenderThread.h" #include "utils/Color.h" #include "utils/PaintUtils.h" diff --git a/libs/hwui/AutoBackendTextureRelease.h b/libs/hwui/AutoBackendTextureRelease.h index f0eb2a8b6eab..d58cd1787ee8 100644 --- a/libs/hwui/AutoBackendTextureRelease.h +++ b/libs/hwui/AutoBackendTextureRelease.h @@ -16,10 +16,10 @@ #pragma once -#include <GrAHardwareBufferUtils.h> -#include <GrBackendSurface.h> #include <SkImage.h> #include <android/hardware_buffer.h> +#include <include/android/GrAHardwareBufferUtils.h> +#include <include/gpu/ganesh/GrBackendSurface.h> #include <system/graphics.h> namespace android { diff --git a/libs/hwui/HardwareBitmapUploader.cpp b/libs/hwui/HardwareBitmapUploader.cpp index 27ea15075682..a2748b050a2d 100644 --- a/libs/hwui/HardwareBitmapUploader.cpp +++ b/libs/hwui/HardwareBitmapUploader.cpp @@ -21,8 +21,6 @@ #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <GLES3/gl3.h> -#include <GrDirectContext.h> -#include <GrTypes.h> #include <SkBitmap.h> #include <SkCanvas.h> #include <SkImage.h> @@ -30,6 +28,8 @@ #include <SkImageInfo.h> #include <SkRefCnt.h> #include <gui/TraceUtils.h> +#include <include/gpu/ganesh/GrDirectContext.h> +#include <include/gpu/ganesh/GrTypes.h> #include <utils/GLUtils.h> #include <utils/NdkUtils.h> #include <utils/Trace.h> diff --git a/libs/hwui/Mesh.h b/libs/hwui/Mesh.h index 8c6ca9758479..afc6adf7f3e0 100644 --- a/libs/hwui/Mesh.h +++ b/libs/hwui/Mesh.h @@ -17,8 +17,8 @@ #ifndef MESH_H_ #define MESH_H_ -#include <GrDirectContext.h> #include <SkMesh.h> +#include <include/gpu/ganesh/GrDirectContext.h> #include <include/gpu/ganesh/SkMeshGanesh.h> #include <jni.h> #include <log/log.h> diff --git a/libs/hwui/RecordingCanvas.cpp b/libs/hwui/RecordingCanvas.cpp index d0263798d2c2..60d7f2d14708 100644 --- a/libs/hwui/RecordingCanvas.cpp +++ b/libs/hwui/RecordingCanvas.cpp @@ -16,9 +16,12 @@ #include "RecordingCanvas.h" -#include <GrRecordingContext.h> #include <SkMesh.h> #include <hwui/Paint.h> +#include <include/gpu/GpuTypes.h> +#include <include/gpu/ganesh/GrDirectContext.h> +#include <include/gpu/ganesh/GrRecordingContext.h> +#include <include/gpu/ganesh/SkMeshGanesh.h> #include <log/log.h> #include <experimental/type_traits> @@ -48,9 +51,6 @@ #include "Tonemapper.h" #include "VectorDrawable.h" #include "effects/GainmapRenderer.h" -#include "include/gpu/GpuTypes.h" // from Skia -#include "include/gpu/GrDirectContext.h" -#include "include/gpu/ganesh/SkMeshGanesh.h" #include "pipeline/skia/AnimatedDrawables.h" #include "pipeline/skia/FunctorDrawable.h" #ifdef __ANDROID__ diff --git a/libs/hwui/pipeline/skia/ATraceMemoryDump.cpp b/libs/hwui/pipeline/skia/ATraceMemoryDump.cpp index 756b937f7de3..38006454b4c7 100644 --- a/libs/hwui/pipeline/skia/ATraceMemoryDump.cpp +++ b/libs/hwui/pipeline/skia/ATraceMemoryDump.cpp @@ -16,12 +16,11 @@ #include "ATraceMemoryDump.h" +#include <include/gpu/ganesh/GrDirectContext.h> #include <utils/Trace.h> #include <cstring> -#include "GrDirectContext.h" - namespace android { namespace uirenderer { namespace skiapipeline { diff --git a/libs/hwui/pipeline/skia/ATraceMemoryDump.h b/libs/hwui/pipeline/skia/ATraceMemoryDump.h index 777d1a2ddb5b..86ff33ff22a2 100644 --- a/libs/hwui/pipeline/skia/ATraceMemoryDump.h +++ b/libs/hwui/pipeline/skia/ATraceMemoryDump.h @@ -16,9 +16,9 @@ #pragma once -#include <GrDirectContext.h> #include <SkString.h> #include <SkTraceMemoryDump.h> +#include <include/gpu/ganesh/GrDirectContext.h> #include <string> #include <unordered_map> diff --git a/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp b/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp index 5d3fb30769ed..85432bfb557a 100644 --- a/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp +++ b/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp @@ -15,24 +15,26 @@ */ #include "GLFunctorDrawable.h" -#include <GrDirectContext.h> + +#include <effects/GainmapRenderer.h> +#include <include/gpu/GpuTypes.h> +#include <include/gpu/ganesh/GrBackendSurface.h> +#include <include/gpu/ganesh/GrDirectContext.h> +#include <include/gpu/ganesh/SkSurfaceGanesh.h> +#include <include/gpu/ganesh/gl/GrGLBackendSurface.h> +#include <include/gpu/ganesh/gl/GrGLTypes.h> #include <private/hwui/DrawGlInfo.h> + #include "FunctorDrawable.h" -#include "GrBackendSurface.h" #include "RenderNode.h" #include "SkAndroidFrameworkUtils.h" #include "SkCanvas.h" #include "SkCanvasAndroid.h" #include "SkClipStack.h" -#include "SkRect.h" #include "SkM44.h" -#include <include/gpu/ganesh/SkSurfaceGanesh.h> -#include "include/gpu/GpuTypes.h" // from Skia -#include <include/gpu/gl/GrGLTypes.h> -#include <include/gpu/ganesh/gl/GrGLBackendSurface.h> -#include "utils/GLUtils.h" -#include <effects/GainmapRenderer.h> +#include "SkRect.h" #include "renderthread/CanvasContext.h" +#include "utils/GLUtils.h" namespace android { namespace uirenderer { diff --git a/libs/hwui/pipeline/skia/LayerDrawable.cpp b/libs/hwui/pipeline/skia/LayerDrawable.cpp index 99f54c19d2e5..8f3366c2f912 100644 --- a/libs/hwui/pipeline/skia/LayerDrawable.cpp +++ b/libs/hwui/pipeline/skia/LayerDrawable.cpp @@ -16,17 +16,17 @@ #include "LayerDrawable.h" +#include <include/gpu/ganesh/GrBackendSurface.h> +#include <include/gpu/ganesh/gl/GrGLTypes.h> #include <shaders/shaders.h> #include <utils/Color.h> #include <utils/MathUtils.h> #include "DeviceInfo.h" -#include "GrBackendSurface.h" #include "SkColorFilter.h" #include "SkRuntimeEffect.h" #include "SkSurface.h" #include "Tonemapper.h" -#include "gl/GrGLTypes.h" #include "math/mat4.h" #include "system/graphics-base-v1.0.h" #include "system/window.h" diff --git a/libs/hwui/pipeline/skia/ShaderCache.cpp b/libs/hwui/pipeline/skia/ShaderCache.cpp index 8e07a2f31de1..22f59a67bccb 100644 --- a/libs/hwui/pipeline/skia/ShaderCache.cpp +++ b/libs/hwui/pipeline/skia/ShaderCache.cpp @@ -16,9 +16,9 @@ #include "ShaderCache.h" -#include <GrDirectContext.h> #include <SkData.h> #include <gui/TraceUtils.h> +#include <include/gpu/ganesh/GrDirectContext.h> #include <log/log.h> #include <openssl/sha.h> diff --git a/libs/hwui/pipeline/skia/ShaderCache.h b/libs/hwui/pipeline/skia/ShaderCache.h index 40dfc9d4309b..4c011613710b 100644 --- a/libs/hwui/pipeline/skia/ShaderCache.h +++ b/libs/hwui/pipeline/skia/ShaderCache.h @@ -17,10 +17,10 @@ #pragma once #include <FileBlobCache.h> -#include <GrContextOptions.h> #include <SkRefCnt.h> #include <cutils/compiler.h> #include <ftl/shared_mutex.h> +#include <include/gpu/ganesh/GrContextOptions.h> #include <utils/Mutex.h> #include <memory> diff --git a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp index e4b1f916b4d6..0768f457972b 100644 --- a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp @@ -16,14 +16,14 @@ #include "pipeline/skia/SkiaOpenGLPipeline.h" -#include <GrBackendSurface.h> #include <SkBlendMode.h> #include <SkImageInfo.h> #include <cutils/properties.h> #include <gui/TraceUtils.h> +#include <include/gpu/ganesh/GrBackendSurface.h> #include <include/gpu/ganesh/SkSurfaceGanesh.h> #include <include/gpu/ganesh/gl/GrGLBackendSurface.h> -#include <include/gpu/gl/GrGLTypes.h> +#include <include/gpu/ganesh/gl/GrGLTypes.h> #include <strings.h> #include "DeferredLayerUpdater.h" diff --git a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp index d06dba05ee88..e1de1e632c68 100644 --- a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp @@ -16,14 +16,14 @@ #include "pipeline/skia/SkiaVulkanPipeline.h" -#include <GrDirectContext.h> -#include <GrTypes.h> #include <SkSurface.h> #include <SkTypes.h> #include <cutils/properties.h> #include <gui/TraceUtils.h> +#include <include/gpu/ganesh/GrDirectContext.h> +#include <include/gpu/ganesh/GrTypes.h> +#include <include/gpu/ganesh/vk/GrVkTypes.h> #include <strings.h> -#include <vk/GrVkTypes.h> #include "DeferredLayerUpdater.h" #include "LightingInfo.h" diff --git a/libs/hwui/pipeline/skia/StretchMask.h b/libs/hwui/pipeline/skia/StretchMask.h index dc698b8e57ff..0baed9fcb2b6 100644 --- a/libs/hwui/pipeline/skia/StretchMask.h +++ b/libs/hwui/pipeline/skia/StretchMask.h @@ -15,9 +15,10 @@ */ #pragma once -#include "GrRecordingContext.h" -#include <effects/StretchEffect.h> #include <SkSurface.h> +#include <effects/StretchEffect.h> +#include <include/gpu/ganesh/GrRecordingContext.h> + #include "SkiaDisplayList.h" namespace android::uirenderer { diff --git a/libs/hwui/pipeline/skia/VkFunctorDrawable.cpp b/libs/hwui/pipeline/skia/VkFunctorDrawable.cpp index 21fe6ff14f56..1ebc3c86b3a7 100644 --- a/libs/hwui/pipeline/skia/VkFunctorDrawable.cpp +++ b/libs/hwui/pipeline/skia/VkFunctorDrawable.cpp @@ -19,12 +19,12 @@ #include <SkAndroidFrameworkUtils.h> #include <SkImage.h> #include <SkM44.h> -#include <include/gpu/ganesh/vk/GrBackendDrawableInfo.h> #include <gui/TraceUtils.h> +#include <include/gpu/ganesh/vk/GrBackendDrawableInfo.h> +#include <include/gpu/ganesh/vk/GrVkTypes.h> #include <private/hwui/DrawVkInfo.h> #include <utils/Color.h> #include <utils/Trace.h> -#include <vk/GrVkTypes.h> #include <thread> diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp index ac2a9366a1f6..277178027383 100644 --- a/libs/hwui/renderthread/CacheManager.cpp +++ b/libs/hwui/renderthread/CacheManager.cpp @@ -16,10 +16,10 @@ #include "CacheManager.h" -#include <GrContextOptions.h> -#include <GrTypes.h> #include <SkExecutor.h> #include <SkGraphics.h> +#include <include/gpu/ganesh/GrContextOptions.h> +#include <include/gpu/ganesh/GrTypes.h> #include <math.h> #include <utils/Trace.h> diff --git a/libs/hwui/renderthread/CacheManager.h b/libs/hwui/renderthread/CacheManager.h index bcfa4f359d83..94f10051688e 100644 --- a/libs/hwui/renderthread/CacheManager.h +++ b/libs/hwui/renderthread/CacheManager.h @@ -18,7 +18,7 @@ #define CACHEMANAGER_H #ifdef __ANDROID__ // Layoutlib does not support hardware acceleration -#include <GrDirectContext.h> +#include <include/gpu/ganesh/GrDirectContext.h> #endif #include <SkSurface.h> #include <utils/String8.h> diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index a024aeb285f9..92c6ad10d1c7 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -16,12 +16,12 @@ #include "RenderThread.h" -#include <GrContextOptions.h> #include <android-base/properties.h> #include <dlfcn.h> -#include <gl/GrGLInterface.h> #include <gui/TraceUtils.h> +#include <include/gpu/ganesh/GrContextOptions.h> #include <include/gpu/ganesh/gl/GrGLDirectContext.h> +#include <include/gpu/ganesh/gl/GrGLInterface.h> #include <private/android/choreographer.h> #include <sys/resource.h> #include <ui/FatVector.h> diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h index 045d26f1d329..86fddbae0831 100644 --- a/libs/hwui/renderthread/RenderThread.h +++ b/libs/hwui/renderthread/RenderThread.h @@ -17,9 +17,9 @@ #ifndef RENDERTHREAD_H_ #define RENDERTHREAD_H_ -#include <GrDirectContext.h> #include <SkBitmap.h> #include <cutils/compiler.h> +#include <include/gpu/ganesh/GrDirectContext.h> #include <surface_control_private.h> #include <utils/Thread.h> diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp index 4d185c69c172..bce84ae77c87 100644 --- a/libs/hwui/renderthread/VulkanManager.cpp +++ b/libs/hwui/renderthread/VulkanManager.cpp @@ -18,19 +18,19 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GrBackendSemaphore.h> -#include <GrBackendSurface.h> -#include <GrDirectContext.h> -#include <GrTypes.h> #include <android/sync.h> #include <gui/TraceUtils.h> +#include <include/gpu/ganesh/GrBackendSemaphore.h> +#include <include/gpu/ganesh/GrBackendSurface.h> +#include <include/gpu/ganesh/GrDirectContext.h> +#include <include/gpu/ganesh/GrTypes.h> #include <include/gpu/ganesh/SkSurfaceGanesh.h> #include <include/gpu/ganesh/vk/GrVkBackendSemaphore.h> #include <include/gpu/ganesh/vk/GrVkBackendSurface.h> #include <include/gpu/ganesh/vk/GrVkDirectContext.h> +#include <include/gpu/ganesh/vk/GrVkTypes.h> #include <include/gpu/vk/VulkanBackendContext.h> #include <ui/FatVector.h> -#include <vk/GrVkTypes.h> #include <sstream> diff --git a/libs/hwui/renderthread/VulkanManager.h b/libs/hwui/renderthread/VulkanManager.h index 08f9d4253d7e..f0425719ea89 100644 --- a/libs/hwui/renderthread/VulkanManager.h +++ b/libs/hwui/renderthread/VulkanManager.h @@ -20,9 +20,9 @@ #if !defined(VK_USE_PLATFORM_ANDROID_KHR) #define VK_USE_PLATFORM_ANDROID_KHR #endif -#include <GrContextOptions.h> #include <SkSurface.h> #include <android-base/unique_fd.h> +#include <include/gpu/ganesh/GrContextOptions.h> #include <utils/StrongPointer.h> #include <vk/VulkanExtensions.h> #include <vulkan/vulkan.h> diff --git a/libs/hwui/renderthread/VulkanSurface.cpp b/libs/hwui/renderthread/VulkanSurface.cpp index 0f29613cad33..20c2b1acaf02 100644 --- a/libs/hwui/renderthread/VulkanSurface.cpp +++ b/libs/hwui/renderthread/VulkanSurface.cpp @@ -16,12 +16,13 @@ #include "VulkanSurface.h" -#include <include/android/SkSurfaceAndroid.h> -#include <GrDirectContext.h> #include <SkSurface.h> +#include <gui/TraceUtils.h> +#include <include/android/SkSurfaceAndroid.h> +#include <include/gpu/ganesh/GrDirectContext.h> + #include <algorithm> -#include <gui/TraceUtils.h> #include "VulkanManager.h" #include "utils/Color.h" diff --git a/libs/hwui/tests/unit/ShaderCacheTests.cpp b/libs/hwui/tests/unit/ShaderCacheTests.cpp index 0f8bd1368f5a..b714534bb26c 100644 --- a/libs/hwui/tests/unit/ShaderCacheTests.cpp +++ b/libs/hwui/tests/unit/ShaderCacheTests.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include <GrDirectContext.h> #include <Properties.h> #include <SkData.h> #include <SkRefCnt.h> @@ -22,6 +21,7 @@ #include <dirent.h> #include <errno.h> #include <gtest/gtest.h> +#include <include/gpu/ganesh/GrDirectContext.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> |