Pass ImplFactory to Texture constructor
This improves encapsulation inside the Texture class, and removes
duplication of createTexture calls. This is a necessary step towards
adding a shared "Data" structure to the Texture classes, following a
similar pattern as for example the Framebuffer class.
This patch also shares the same MockFactory class among different
unit tests.
BUG=angleproject:596
TEST=angle_unittests
Change-Id: Ie8d3a9aa4ec35565d7ecbabb8c40e7b1ba068721
Reviewed-on: https://chromium-review.googlesource.com/340200
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/libANGLE/TransformFeedback_unittest.cpp b/src/libANGLE/TransformFeedback_unittest.cpp
index 56d02e2..4303900 100644
--- a/src/libANGLE/TransformFeedback_unittest.cpp
+++ b/src/libANGLE/TransformFeedback_unittest.cpp
@@ -20,12 +20,6 @@
namespace
{
-class MockFactory : public rx::NullFactory
-{
- public:
- MOCK_METHOD0(createTransformFeedback, rx::TransformFeedbackImpl *());
-};
-
class TransformFeedbackTest : public testing::Test
{
protected:
@@ -59,7 +53,7 @@
testing::Mock::VerifyAndClear(mImpl);
}
- MockFactory mMockFactory;
+ rx::MockFactory mMockFactory;
rx::MockTransformFeedbackImpl* mImpl;
gl::TransformFeedback* mFeedback;
gl::Caps mCaps;