Commit 48115b6f by Jamie Madill

Use rx::ImplFactory in Framebuffer init.

BUG=angleproject:942 Change-Id: Idf14a4e42148b379b64b129ab649a9222cf1fb52 Reviewed-on: https://chromium-review.googlesource.com/258902Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent ae6495e5
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "libANGLE/Renderbuffer.h" #include "libANGLE/Renderbuffer.h"
#include "libANGLE/FramebufferAttachment.h" #include "libANGLE/FramebufferAttachment.h"
#include "libANGLE/renderer/FramebufferImpl.h" #include "libANGLE/renderer/FramebufferImpl.h"
#include "libANGLE/renderer/Renderer.h" #include "libANGLE/renderer/ImplFactory.h"
#include "libANGLE/renderer/RenderbufferImpl.h" #include "libANGLE/renderer/RenderbufferImpl.h"
#include "libANGLE/renderer/Workarounds.h" #include "libANGLE/renderer/Workarounds.h"
...@@ -80,9 +80,9 @@ FramebufferAttachment *Framebuffer::Data::getDepthOrStencilAttachment() const ...@@ -80,9 +80,9 @@ FramebufferAttachment *Framebuffer::Data::getDepthOrStencilAttachment() const
return (mDepthAttachment != nullptr ? mDepthAttachment : mStencilAttachment); return (mDepthAttachment != nullptr ? mDepthAttachment : mStencilAttachment);
} }
Framebuffer::Framebuffer(const Caps &caps, rx::Renderer *renderer, GLuint id) Framebuffer::Framebuffer(const Caps &caps, rx::ImplFactory *factory, GLuint id)
: mData(caps), : mData(caps),
mImpl(renderer->createFramebuffer(mData)), mImpl(factory->createFramebuffer(mData)),
mId(id) mId(id)
{ {
ASSERT(mImpl != nullptr); ASSERT(mImpl != nullptr);
...@@ -622,12 +622,12 @@ void Framebuffer::setAttachment(GLenum attachment, FramebufferAttachment *attach ...@@ -622,12 +622,12 @@ void Framebuffer::setAttachment(GLenum attachment, FramebufferAttachment *attach
} }
} }
DefaultFramebuffer::DefaultFramebuffer(const Caps &caps, rx::Renderer *renderer, egl::Surface *surface) DefaultFramebuffer::DefaultFramebuffer(const Caps &caps, rx::ImplFactory *factory, egl::Surface *surface)
: Framebuffer(caps, renderer, 0) : Framebuffer(caps, factory, 0)
{ {
rx::DefaultAttachmentImpl *colorAttachment = renderer->createDefaultAttachment(GL_BACK, surface); rx::DefaultAttachmentImpl *colorAttachment = factory->createDefaultAttachment(GL_BACK, surface);
rx::DefaultAttachmentImpl *depthAttachment = renderer->createDefaultAttachment(GL_DEPTH, surface); rx::DefaultAttachmentImpl *depthAttachment = factory->createDefaultAttachment(GL_DEPTH, surface);
rx::DefaultAttachmentImpl *stencilAttachment = renderer->createDefaultAttachment(GL_STENCIL, surface); rx::DefaultAttachmentImpl *stencilAttachment = factory->createDefaultAttachment(GL_STENCIL, surface);
ASSERT(colorAttachment); ASSERT(colorAttachment);
setAttachment(GL_BACK, new DefaultAttachment(GL_BACK, colorAttachment)); setAttachment(GL_BACK, new DefaultAttachment(GL_BACK, colorAttachment));
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
namespace rx namespace rx
{ {
class DefaultAttachmentImpl; class DefaultAttachmentImpl;
class ImplFactory;
class FramebufferImpl; class FramebufferImpl;
class RenderbufferImpl; class RenderbufferImpl;
class Renderer;
struct Workarounds; struct Workarounds;
} }
...@@ -71,7 +71,7 @@ class Framebuffer ...@@ -71,7 +71,7 @@ class Framebuffer
DISALLOW_COPY_AND_ASSIGN(Data); DISALLOW_COPY_AND_ASSIGN(Data);
}; };
Framebuffer(const Caps &caps, rx::Renderer *renderer, GLuint id); Framebuffer(const Caps &caps, rx::ImplFactory *factory, GLuint id);
virtual ~Framebuffer(); virtual ~Framebuffer();
const rx::FramebufferImpl *getImplementation() const { return mImpl; } const rx::FramebufferImpl *getImplementation() const { return mImpl; }
...@@ -143,7 +143,7 @@ class Framebuffer ...@@ -143,7 +143,7 @@ class Framebuffer
class DefaultFramebuffer : public Framebuffer class DefaultFramebuffer : public Framebuffer
{ {
public: public:
DefaultFramebuffer(const gl::Caps &caps, rx::Renderer *renderer, egl::Surface *surface); DefaultFramebuffer(const gl::Caps &caps, rx::ImplFactory *factory, egl::Surface *surface);
private: private:
DISALLOW_COPY_AND_ASSIGN(DefaultFramebuffer); DISALLOW_COPY_AND_ASSIGN(DefaultFramebuffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment