aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-06-03 17:51:44 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-06-03 17:51:44 +0000
commitdedb3b87e06842545acab7c8a353b38c0bf4a7b9 (patch)
tree89b828e5e0d47ac119133be71e80b618684fda20
parentaa7bda432190fe569b01d62eed7d7ae232fd3a4d (diff)
parent942dd778ecd7bf5bbfece1a73fe7c62ed93498d5 (diff)
downloadgoldfish-opengl-dedb3b87e06842545acab7c8a353b38c0bf4a7b9.tar.gz
Snap for 8680342 from 942dd778ecd7bf5bbfece1a73fe7c62ed93498d5 to mainline-go-tethering-release
Change-Id: I865b7c9114ece7ed5e11b8d432177e4d734f1716
-rw-r--r--system/codecs/c2/decoders/avcdec/C2GoldfishAvcDec.cpp5
-rw-r--r--system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp5
-rw-r--r--system/codecs/c2/decoders/vpxdec/C2GoldfishVpxDec.cpp5
3 files changed, 9 insertions, 6 deletions
diff --git a/system/codecs/c2/decoders/avcdec/C2GoldfishAvcDec.cpp b/system/codecs/c2/decoders/avcdec/C2GoldfishAvcDec.cpp
index 8e871458..90b56532 100644
--- a/system/codecs/c2/decoders/avcdec/C2GoldfishAvcDec.cpp
+++ b/system/codecs/c2/decoders/avcdec/C2GoldfishAvcDec.cpp
@@ -670,10 +670,11 @@ C2GoldfishAvcDec::ensureDecoderState(const std::shared_ptr<C2BlockPool> &pool) {
void C2GoldfishAvcDec::checkMode(const std::shared_ptr<C2BlockPool> &pool) {
mWidth = mIntf->width();
mHeight = mIntf->height();
- const bool isGraphic = (pool->getAllocatorId() == C2Allocator::GRAPHIC);
+ const bool isGraphic = (pool->getAllocatorId() & C2Allocator::GRAPHIC);
+ DDD("buffer id %d", (int)(pool->getAllocatorId()));
if (isGraphic) {
DDD("decoding to host color buffer");
- mEnableAndroidNativeBuffers = false;
+ mEnableAndroidNativeBuffers = true;
} else {
DDD("decoding to guest byte buffer");
mEnableAndroidNativeBuffers = false;
diff --git a/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp b/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp
index 7aac56f8..7008bd5d 100644
--- a/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp
+++ b/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp
@@ -661,10 +661,11 @@ C2GoldfishHevcDec::ensureDecoderState(const std::shared_ptr<C2BlockPool> &pool)
void C2GoldfishHevcDec::checkMode(const std::shared_ptr<C2BlockPool> &pool) {
mWidth = mIntf->width();
mHeight = mIntf->height();
- const bool isGraphic = (pool->getAllocatorId() == C2Allocator::GRAPHIC);
+ const bool isGraphic = (pool->getAllocatorId() & C2Allocator::GRAPHIC);
+ DDD("buffer id %d", (int)(pool->getAllocatorId()));
if (isGraphic) {
DDD("decoding to host color buffer");
- mEnableAndroidNativeBuffers = false;
+ mEnableAndroidNativeBuffers = true;
} else {
DDD("decoding to guest byte buffer");
mEnableAndroidNativeBuffers = false;
diff --git a/system/codecs/c2/decoders/vpxdec/C2GoldfishVpxDec.cpp b/system/codecs/c2/decoders/vpxdec/C2GoldfishVpxDec.cpp
index bb61cf94..99f0469a 100644
--- a/system/codecs/c2/decoders/vpxdec/C2GoldfishVpxDec.cpp
+++ b/system/codecs/c2/decoders/vpxdec/C2GoldfishVpxDec.cpp
@@ -465,10 +465,11 @@ void C2GoldfishVpxDec::checkContext(const std::shared_ptr<C2BlockPool> &pool) {
mCtx = new vpx_codec_ctx_t;
mCtx->vpversion = mMode == MODE_VP8 ? 8 : 9;
- const bool isGraphic = (pool->getAllocatorId() == C2Allocator::GRAPHIC);
+ const bool isGraphic = (pool->getAllocatorId() & C2Allocator::GRAPHIC);
+ DDD("buffer id %d", (int)(pool->getAllocatorId()));
if (isGraphic) {
DDD("decoding to host color buffer");
- mEnableAndroidNativeBuffers = false;
+ mEnableAndroidNativeBuffers = true;
} else {
DDD("decoding to guest byte buffer");
mEnableAndroidNativeBuffers = false;