Generalize Context scratch buffer errors.
This refactor will allow us to generate different error types in
different backends. This makes Vulkan happy because it won't have to
generate gl::Errors and can stay with vk::Error.
Bug: angleproject:2713
Change-Id: I981402450f3b519d4f79851982547695d583355a
Reviewed-on: https://chromium-review.googlesource.com/1128921
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/VertexDataManager.cpp b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
index ca9a116..8e53155 100644
--- a/src/libANGLE/renderer/d3d/VertexDataManager.cpp
+++ b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
@@ -206,11 +206,7 @@
{
mStreamingBuffer.reset(
new StreamingVertexBufferInterface(mFactory, INITIAL_STREAM_BUFFER_SIZE));
- if (!mStreamingBuffer)
- {
- return gl::OutOfMemory() << "Failed to allocate the streaming vertex buffer.";
- }
-
+ ANGLE_TRY_ALLOCATION(mStreamingBuffer);
return gl::NoError();
}