diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index c0f3086..5b51b64 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -289,7 +289,8 @@
 
 float CanvasContext::setColorMode(ColorMode mode) {
     if (mode != mColorMode) {
-        if (mode == ColorMode::Hdr && !mRenderPipeline->supportsExtendedRangeHdr()) {
+        const bool isHdr = mode == ColorMode::Hdr || mode == ColorMode::Hdr10;
+        if (isHdr && !mRenderPipeline->supportsExtendedRangeHdr()) {
             mode = ColorMode::WideColorGamut;
         }
         mColorMode = mode;
@@ -299,13 +300,15 @@
     switch (mColorMode) {
         case ColorMode::Hdr:
             return 3.f;  // TODO: Refine this number
+        case ColorMode::Hdr10:
+            return 10.f;
         default:
             return 1.f;
     }
 }
 
 float CanvasContext::targetSdrHdrRatio() const {
-    if (mColorMode == ColorMode::Hdr) {
+    if (mColorMode == ColorMode::Hdr || mColorMode == ColorMode::Hdr10) {
         return mTargetSdrHdrRatio;
     } else {
         return 1.f;
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp
index 5b7cf75..4fb114b 100644
--- a/libs/hwui/renderthread/EglManager.cpp
+++ b/libs/hwui/renderthread/EglManager.cpp
@@ -455,6 +455,7 @@
                 // composer3 support, just treat HDR as equivalent to wide color gamut if
                 // the GLES path is still being hit
                 case ColorMode::Hdr:
+                case ColorMode::Hdr10:
                 case ColorMode::WideColorGamut: {
                     skcms_Matrix3x3 colorGamut;
                     LOG_ALWAYS_FATAL_IF(!colorSpace->toXYZD50(&colorGamut),
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index f8e2dee..cdfbf02 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -134,7 +134,7 @@
 float RenderProxy::setColorMode(ColorMode mode) {
     // We only need to figure out what the renderer supports for HDR, otherwise this can stay
     // an async call since we already know the return value
-    if (mode == ColorMode::Hdr) {
+    if (mode == ColorMode::Hdr || mode == ColorMode::Hdr10) {
         return mRenderThread.queue().runSync(
                 [=]() -> float { return mContext->setColorMode(mode); });
     } else {
diff --git a/libs/hwui/renderthread/VulkanSurface.cpp b/libs/hwui/renderthread/VulkanSurface.cpp
index 2efa5d6..21b6c44 100644
--- a/libs/hwui/renderthread/VulkanSurface.cpp
+++ b/libs/hwui/renderthread/VulkanSurface.cpp
@@ -201,7 +201,7 @@
     outWindowInfo->colorspace = colorSpace;
     outWindowInfo->colorMode = colorMode;
 
-    if (colorMode == ColorMode::Hdr) {
+    if (colorMode == ColorMode::Hdr || colorMode == ColorMode::Hdr10) {
         outWindowInfo->dataspace =
                 static_cast<android_dataspace>(STANDARD_DCI_P3 | TRANSFER_SRGB | RANGE_EXTENDED);
     } else {
@@ -509,7 +509,7 @@
         mNativeBuffers[i].skSurface.reset();
     }
 
-    if (mWindowInfo.colorMode == ColorMode::Hdr) {
+    if (mWindowInfo.colorMode == ColorMode::Hdr || mWindowInfo.colorMode == ColorMode::Hdr10) {
         mWindowInfo.dataspace =
                 static_cast<android_dataspace>(STANDARD_DCI_P3 | TRANSFER_SRGB | RANGE_EXTENDED);
     } else {
@@ -521,7 +521,7 @@
                         "Unsupported colorspace");
 
     if (mNativeWindow) {
-        int err = native_window_set_buffers_data_space(mNativeWindow.get(), mWindowInfo.dataspace);
+        int err = ANativeWindow_setBuffersDataSpace(mNativeWindow.get(), mWindowInfo.dataspace);
         if (err != 0) {
             ALOGE("VulkanSurface::setColorSpace() native_window_set_buffers_data_space(%d) "
                   "failed: %s (%d)",
