From c2a6537fb96b6af210167797f9037b0a39a3a11b Mon Sep 17 00:00:00 2001 From: Alec Mouri Date: Mon, 9 Dec 2019 17:08:47 -0800 Subject: [PATCH] [HWUI] Hook up ANativeWindow_allocateBuffers Bug: 137012798 Test: builds Change-Id: Iefe7b73470cb6229fc72d1a1aa33eceb827f527c --- libs/hwui/renderthread/CanvasContext.cpp | 3 ++- libs/hwui/renderthread/ReliableSurface.h | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index 096e25344f477..699b96a685c9f 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -205,7 +205,8 @@ void CanvasContext::setStopped(bool stopped) { void CanvasContext::allocateBuffers() { if (mNativeSurface) { - mNativeSurface->allocateBuffers(); + ANativeWindow* anw = mNativeSurface->getNativeWindow(); + ANativeWindow_allocateBuffers(anw); } } diff --git a/libs/hwui/renderthread/ReliableSurface.h b/libs/hwui/renderthread/ReliableSurface.h index a823d9da0ab38..32472539f616c 100644 --- a/libs/hwui/renderthread/ReliableSurface.h +++ b/libs/hwui/renderthread/ReliableSurface.h @@ -41,8 +41,6 @@ public: int reserveNext(); - void allocateBuffers() { mSurface->allocateBuffers(); } - int query(int what, int* value) const { return mSurface->query(what, value); } uint64_t getNextFrameNumber() const { return mSurface->getNextFrameNumber(); }