summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread
diff options
context:
space:
mode:
author Jerome Gaillard <jgaillard@google.com> 2024-03-28 14:21:16 +0000
committer Jerome Gaillard <jgaillard@google.com> 2024-04-03 14:18:46 +0100
commitbea67ce5014bf5554d0fbbdbf9f4e96e4803a435 (patch)
tree81e3bfcb24d6d4fab6fb4805597b2964b501b68e /libs/hwui/renderthread
parent3a79b1d7aa3a3816b23b2067f434f428b685cf2b (diff)
Create a new RenderPipeline for CPU only rendering
This takes out of SkiaPipeline what relies on GPU, and puts it into SkiaGpuPipeline, making SkiaOpenGLPipeline and SkiaVulkanPipeline inherit from SkiaGpuPipeline. From the new restricted SkiaPipeline, this creates SkiaCpuPipeline that only relies on CPU for rendering. In addition, this moves references to the GrContext out of IRenderPipeline and into SkGpuPipeline as the only usage is in classes inheriting from SkGpuPipeline. Bug: 322360037 Test: build libhwui on host Change-Id: Ifadacfc593ff54377d6a8a65b0505e294c8d1b29
Diffstat (limited to 'libs/hwui/renderthread')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp4
-rw-r--r--libs/hwui/renderthread/IRenderPipeline.h3
2 files changed, 2 insertions, 5 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 1fbd580874f6..22de2f29792d 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -35,8 +35,8 @@
#include "Properties.h"
#include "RenderThread.h"
#include "hwui/Canvas.h"
+#include "pipeline/skia/SkiaGpuPipeline.h"
#include "pipeline/skia/SkiaOpenGLPipeline.h"
-#include "pipeline/skia/SkiaPipeline.h"
#include "pipeline/skia/SkiaVulkanPipeline.h"
#include "thread/CommonPool.h"
#include "utils/GLUtils.h"
@@ -108,7 +108,7 @@ void CanvasContext::invokeFunctor(const RenderThread& thread, Functor* functor)
}
void CanvasContext::prepareToDraw(const RenderThread& thread, Bitmap* bitmap) {
- skiapipeline::SkiaPipeline::prepareToDraw(thread, bitmap);
+ skiapipeline::SkiaGpuPipeline::prepareToDraw(thread, bitmap);
}
CanvasContext::CanvasContext(RenderThread& thread, bool translucent, RenderNode* rootRenderNode,
diff --git a/libs/hwui/renderthread/IRenderPipeline.h b/libs/hwui/renderthread/IRenderPipeline.h
index b8c3a4de2bd4..ee1d1f8789d9 100644
--- a/libs/hwui/renderthread/IRenderPipeline.h
+++ b/libs/hwui/renderthread/IRenderPipeline.h
@@ -30,8 +30,6 @@
#include "SwapBehavior.h"
#include "hwui/Bitmap.h"
-class GrDirectContext;
-
struct ANativeWindow;
namespace android {
@@ -94,7 +92,6 @@ public:
virtual void setSurfaceColorProperties(ColorMode colorMode) = 0;
virtual SkColorType getSurfaceColorType() const = 0;
virtual sk_sp<SkColorSpace> getSurfaceColorSpace() = 0;
- virtual GrSurfaceOrigin getSurfaceOrigin() = 0;
virtual void setPictureCapturedCallback(
const std::function<void(sk_sp<SkPicture>&&)>& callback) = 0;