1 // 2 // Copyright 2016 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // FramebufferNULL.h: 7 // Defines the class interface for FramebufferNULL, implementing FramebufferImpl. 8 // 9 10 #ifndef LIBANGLE_RENDERER_NULL_FRAMEBUFFERNULL_H_ 11 #define LIBANGLE_RENDERER_NULL_FRAMEBUFFERNULL_H_ 12 13 #include "libANGLE/renderer/FramebufferImpl.h" 14 15 namespace rx 16 { 17 18 class FramebufferNULL : public FramebufferImpl 19 { 20 public: 21 FramebufferNULL(const gl::FramebufferState &state); 22 ~FramebufferNULL() override; 23 24 angle::Result discard(const gl::Context *context, 25 size_t count, 26 const GLenum *attachments) override; 27 angle::Result invalidate(const gl::Context *context, 28 size_t count, 29 const GLenum *attachments) override; 30 angle::Result invalidateSub(const gl::Context *context, 31 size_t count, 32 const GLenum *attachments, 33 const gl::Rectangle &area) override; 34 35 angle::Result clear(const gl::Context *context, GLbitfield mask) override; 36 angle::Result clearBufferfv(const gl::Context *context, 37 GLenum buffer, 38 GLint drawbuffer, 39 const GLfloat *values) override; 40 angle::Result clearBufferuiv(const gl::Context *context, 41 GLenum buffer, 42 GLint drawbuffer, 43 const GLuint *values) override; 44 angle::Result clearBufferiv(const gl::Context *context, 45 GLenum buffer, 46 GLint drawbuffer, 47 const GLint *values) override; 48 angle::Result clearBufferfi(const gl::Context *context, 49 GLenum buffer, 50 GLint drawbuffer, 51 GLfloat depth, 52 GLint stencil) override; 53 54 angle::Result readPixels(const gl::Context *context, 55 const gl::Rectangle &area, 56 GLenum format, 57 GLenum type, 58 const gl::PixelPackState &pack, 59 gl::Buffer *packBuffer, 60 void *pixels) override; 61 62 angle::Result blit(const gl::Context *context, 63 const gl::Rectangle &sourceArea, 64 const gl::Rectangle &destArea, 65 GLbitfield mask, 66 GLenum filter) override; 67 68 gl::FramebufferStatus checkStatus(const gl::Context *context) const override; 69 70 angle::Result syncState(const gl::Context *context, 71 GLenum binding, 72 const gl::Framebuffer::DirtyBits &dirtyBits, 73 gl::Command command) override; 74 75 angle::Result getSamplePosition(const gl::Context *context, 76 size_t index, 77 GLfloat *xy) const override; 78 }; 79 80 } // namespace rx 81 82 #endif // LIBANGLE_RENDERER_NULL_FRAMEBUFFERNULL_H_ 83