X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fsrc%2Fanbox%2Fgraphics%2Femugl%2FRenderable.cpp;fp=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fsrc%2Fanbox%2Fgraphics%2Femugl%2FRenderable.cpp;h=2bcbfc23322d0cd77992c76377180863e412ff2c;hb=e26c1ec581be598521517829adba8c8dd23a768f;hp=0000000000000000000000000000000000000000;hpb=6699c1aea74eeb0eb400e6299079f0c7576f716f;p=iec.git diff --git a/src/type3_AndroidCloud/anbox-master/src/anbox/graphics/emugl/Renderable.cpp b/src/type3_AndroidCloud/anbox-master/src/anbox/graphics/emugl/Renderable.cpp new file mode 100644 index 0000000..2bcbfc2 --- /dev/null +++ b/src/type3_AndroidCloud/anbox-master/src/anbox/graphics/emugl/Renderable.cpp @@ -0,0 +1,55 @@ +/* +* Copyright (C) 2016 Simon Fels +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "anbox/graphics/emugl/Renderable.h" + +Renderable::Renderable(const std::string &name, const std::uint32_t &buffer, float alpha, + const anbox::graphics::Rect &screen_position, + const anbox::graphics::Rect &crop, + const glm::mat4 &transformation) + : name_(name), + buffer_(buffer), + screen_position_(screen_position), + crop_(crop), + transformation_(transformation), + alpha_(alpha) {} + +Renderable::~Renderable() {} + +std::string Renderable::name() const { return name_; } + +std::uint32_t Renderable::buffer() const { return buffer_; } + +anbox::graphics::Rect Renderable::screen_position() const { + return screen_position_; +} + +anbox::graphics::Rect Renderable::crop() const { return crop_; } + +glm::mat4 Renderable::transformation() const { return transformation_; } + +float Renderable::alpha() const { return alpha_; } + +void Renderable::set_screen_position( + const anbox::graphics::Rect &screen_position) { + screen_position_ = screen_position; +} + +std::ostream &operator<<(std::ostream &out, const Renderable &r) { + return out << "{ name " << r.name() << " buffer " << r.buffer() + << " screen position " << r.screen_position() << " crop " + << r.crop() << " alpha " << r.alpha(); +}