.. _program_listing_file_include_miroil_miroil_mirbuffer.h: Program Listing for File mirbuffer.h ==================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/miroil/miroil/mirbuffer.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* * Copyright © Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef MIROIL_GLBUFFER_H #define MIROIL_GLBUFFER_H #include #include #include namespace mir { namespace graphics { class Buffer; }} namespace miroil { class GLBuffer { public: ~GLBuffer(); explicit GLBuffer(std::shared_ptr const& buffer); bool has_alpha_channel() const; mir::geometry::Size size() const; void bind(); void reset(std::shared_ptr const& buffer); void reset(); bool empty(); [[deprecated("Use constructor instead")]] static std::shared_ptr from_mir_buffer(std::shared_ptr const& buffer); private: std::shared_ptr wrapped; }; } #endif //MIROIL_GLBUFFER_H