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 @@
#include "libANGLE/Renderbuffer.h"
#include "libANGLE/FramebufferAttachment.h"
#include "libANGLE/renderer/FramebufferImpl.h"
#include "libANGLE/renderer/Renderer.h"
#include "libANGLE/renderer/ImplFactory.h"
#include "libANGLE/renderer/RenderbufferImpl.h"
#include "libANGLE/renderer/Workarounds.h"
......@@ -80,9 +80,9 @@ FramebufferAttachment *Framebuffer::Data::getDepthOrStencilAttachment() const
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),
mImpl(renderer->createFramebuffer(mData)),
mImpl(factory->createFramebuffer(mData)),
mId(id)
{
ASSERT(mImpl != nullptr);
......@@ -622,12 +622,12 @@ void Framebuffer::setAttachment(GLenum attachment, FramebufferAttachment *attach
}
}
DefaultFramebuffer::DefaultFramebuffer(const Caps &caps, rx::Renderer *renderer, egl::Surface *surface)
: Framebuffer(caps, renderer, 0)
DefaultFramebuffer::DefaultFramebuffer(const Caps &caps, rx::ImplFactory *factory, egl::Surface *surface)
: Framebuffer(caps, factory, 0)
{
rx::DefaultAttachmentImpl *colorAttachment = renderer->createDefaultAttachment(GL_BACK, surface);
rx::DefaultAttachmentImpl *depthAttachment = renderer->createDefaultAttachment(GL_DEPTH, surface);
rx::DefaultAttachmentImpl *stencilAttachment = renderer->createDefaultAttachment(GL_STENCIL, surface);
rx::DefaultAttachmentImpl *colorAttachment = factory->createDefaultAttachment(GL_BACK, surface);
rx::DefaultAttachmentImpl *depthAttachment = factory->createDefaultAttachment(GL_DEPTH, surface);
rx::DefaultAttachmentImpl *stencilAttachment = factory->createDefaultAttachment(GL_STENCIL, surface);
ASSERT(colorAttachment);
setAttachment(GL_BACK, new DefaultAttachment(GL_BACK, colorAttachment));
......
......@@ -20,9 +20,9 @@
namespace rx
{
class DefaultAttachmentImpl;
class ImplFactory;
class FramebufferImpl;
class RenderbufferImpl;
class Renderer;
struct Workarounds;
}
......@@ -71,7 +71,7 @@ class Framebuffer
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();
const rx::FramebufferImpl *getImplementation() const { return mImpl; }
......@@ -143,7 +143,7 @@ class Framebuffer
class DefaultFramebuffer : public Framebuffer
{
public:
DefaultFramebuffer(const gl::Caps &caps, rx::Renderer *renderer, egl::Surface *surface);
DefaultFramebuffer(const gl::Caps &caps, rx::ImplFactory *factory, egl::Surface *surface);
private:
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