diff options
author | Alec Mouri <alecmouri@google.com> | 2019-12-23 07:46:19 -0800 |
---|---|---|
committer | Alec Mouri <alecmouri@google.com> | 2020-02-14 15:24:16 -0800 |
commit | 43fe6fcde5cb2630a8d1ffa47d3e6e58e11999ae (patch) | |
tree | 212c6c6fa2959b3288a5031f5271048d10c8734a /libs/hwui/renderthread/RenderProxy.h | |
parent | 112dfb3f1606b2033cdec7fc0b829d6cac31838e (diff) |
[HWUI] Remove references to gui/Surface.
ANativeWindow usage now has enough feature parity so that we can use
that instead.
Bug: 137012798
Test: builds
Test: Scroll through settings
Change-Id: I0054315058b28bcb5e779a6f71a3cfb164625a5f
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.h')
-rw-r--r-- | libs/hwui/renderthread/RenderProxy.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h index ab0dd2bcc8f5..3baeb2f7a476 100644 --- a/libs/hwui/renderthread/RenderProxy.h +++ b/libs/hwui/renderthread/RenderProxy.h @@ -18,6 +18,7 @@ #define RENDERPROXY_H_ #include <SkBitmap.h> +#include <android/native_window.h> #include <cutils/compiler.h> #include <utils/Functor.h> @@ -69,7 +70,7 @@ public: ANDROID_API bool loadSystemProperties(); ANDROID_API void setName(const char* name); - ANDROID_API void setSurface(const sp<Surface>& surface, bool enableTimeout = true); + ANDROID_API void setSurface(ANativeWindow* window, bool enableTimeout = true); ANDROID_API void allocateBuffers(); ANDROID_API bool pause(); ANDROID_API void setStopped(bool stopped); @@ -140,11 +141,7 @@ public: */ ANDROID_API void setRenderAheadDepth(int renderAhead); - // TODO: This api will need to take in an ANativeWindow instead, but the - // caller, ThreadedRenderer, doesn't have access to libandroid due to a - // circular dependency, so it can't use the JNI ANativeWindow methods. Once - // that is resolved then replace the surface type here. - ANDROID_API static int copySurfaceInto(sp<Surface>& surface, int left, int top, int right, + ANDROID_API static int copySurfaceInto(ANativeWindow* window, int left, int top, int right, int bottom, SkBitmap* bitmap); ANDROID_API static void prepareToDraw(Bitmap& bitmap); |