Use angle::Result in allocation and math check macros.

Replace these with ANGLE_CHECK_*_ALLOC and ANGLE_CHECK_*_MATH depending
on the specific error type.

Bug: angleproject:2491
Change-Id: Ic4395101fe701c563ae2b92aa2c55c93b934a7de
Reviewed-on: https://chromium-review.googlesource.com/c/1262737
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/null/FramebufferNULL.cpp b/src/libANGLE/renderer/null/FramebufferNULL.cpp
index 865a70a..b6c1bab 100644
--- a/src/libANGLE/renderer/null/FramebufferNULL.cpp
+++ b/src/libANGLE/renderer/null/FramebufferNULL.cpp
@@ -9,11 +9,11 @@
 
 #include "libANGLE/renderer/null/FramebufferNULL.h"
 
+#include "common/debug.h"
 #include "libANGLE/Context.h"
 #include "libANGLE/formatutils.h"
 #include "libANGLE/renderer/null/BufferNULL.h"
-
-#include "common/debug.h"
+#include "libANGLE/renderer/null/ContextNULL.h"
 
 namespace rx
 {
@@ -147,13 +147,16 @@
     // Compute size of unclipped rows and initial skip
     const gl::InternalFormat &glFormat = gl::GetInternalFormatInfo(format, type);
 
+    ContextNULL *contextNull = GetImplAs<ContextNULL>(context);
+
     GLuint rowBytes = 0;
-    ANGLE_TRY_CHECKED_MATH(glFormat.computeRowPitch(type, origArea.width, packState.alignment,
-                                                    packState.rowLength, &rowBytes));
+    ANGLE_CHECK_GL_MATH(contextNull,
+                        glFormat.computeRowPitch(type, origArea.width, packState.alignment,
+                                                 packState.rowLength, &rowBytes));
 
     GLuint skipBytes = 0;
-    ANGLE_TRY_CHECKED_MATH(
-        glFormat.computeSkipBytes(type, rowBytes, 0, packState, false, &skipBytes));
+    ANGLE_CHECK_GL_MATH(contextNull,
+                        glFormat.computeSkipBytes(type, rowBytes, 0, packState, false, &skipBytes));
     pixels += skipBytes;
 
     // Skip OOB region up to first in bounds pixel