"Implement" FramebufferNULL::getImplementationColorRead*

BUG=angleproject:1468

Change-Id: I2727602e66a4f4f2ca166948eebd9c975e315fe7
Reviewed-on: https://chromium-review.googlesource.com/412861
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/renderer/null/FramebufferNULL.cpp b/src/libANGLE/renderer/null/FramebufferNULL.cpp
index 14ebe1e..cedea8e 100644
--- a/src/libANGLE/renderer/null/FramebufferNULL.cpp
+++ b/src/libANGLE/renderer/null/FramebufferNULL.cpp
@@ -9,6 +9,8 @@
 
 #include "libANGLE/renderer/null/FramebufferNULL.h"
 
+#include "libANGLE/formatutils.h"
+
 #include "common/debug.h"
 
 namespace rx
@@ -87,14 +89,28 @@
 
 GLenum FramebufferNULL::getImplementationColorReadFormat() const
 {
-    UNIMPLEMENTED();
-    return GLenum();
+    const gl::FramebufferAttachment *readAttachment = mState.getReadAttachment();
+    if (readAttachment == nullptr)
+    {
+        return GL_NONE;
+    }
+
+    const gl::Format &format = readAttachment->getFormat();
+    ASSERT(format.info != nullptr);
+    return format.info->getReadPixelsFormat();
 }
 
 GLenum FramebufferNULL::getImplementationColorReadType() const
 {
-    UNIMPLEMENTED();
-    return GLenum();
+    const gl::FramebufferAttachment *readAttachment = mState.getReadAttachment();
+    if (readAttachment == nullptr)
+    {
+        return GL_NONE;
+    }
+
+    const gl::Format &format = readAttachment->getFormat();
+    ASSERT(format.info != nullptr);
+    return format.info->getReadPixelsType();
 }
 
 gl::Error FramebufferNULL::readPixels(ContextImpl *context,