2013-12-03 22:44:38 +04:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "SurfaceTypes.h"
|
2014-07-12 02:10:49 +04:00
|
|
|
|
2013-12-03 22:44:38 +04:00
|
|
|
#include "mozilla/layers/ISurfaceAllocator.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
2014-07-12 02:10:49 +04:00
|
|
|
namespace gl {
|
2013-12-03 22:44:38 +04:00
|
|
|
|
|
|
|
SurfaceCaps::SurfaceCaps()
|
|
|
|
{
|
2014-08-28 03:16:22 +04:00
|
|
|
Clear();
|
2013-12-03 22:44:38 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
SurfaceCaps::SurfaceCaps(const SurfaceCaps& other)
|
|
|
|
{
|
2014-08-28 03:16:22 +04:00
|
|
|
*this = other;
|
2013-12-03 22:44:38 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
SurfaceCaps&
|
|
|
|
SurfaceCaps::operator=(const SurfaceCaps& other)
|
|
|
|
{
|
2014-08-28 03:16:22 +04:00
|
|
|
any = other.any;
|
|
|
|
color = other.color;
|
|
|
|
alpha = other.alpha;
|
|
|
|
bpp16 = other.bpp16;
|
|
|
|
depth = other.depth;
|
|
|
|
stencil = other.stencil;
|
|
|
|
antialias = other.antialias;
|
2014-10-08 08:11:54 +04:00
|
|
|
premultAlpha = other.premultAlpha;
|
2014-08-28 03:16:22 +04:00
|
|
|
preserve = other.preserve;
|
|
|
|
surfaceAllocator = other.surfaceAllocator;
|
|
|
|
|
|
|
|
return *this;
|
2013-12-03 22:44:38 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SurfaceCaps::Clear()
|
|
|
|
{
|
2014-08-28 03:16:22 +04:00
|
|
|
any = false;
|
|
|
|
color = false;
|
|
|
|
alpha = false;
|
|
|
|
bpp16 = false;
|
|
|
|
depth = false;
|
|
|
|
stencil = false;
|
|
|
|
antialias = false;
|
2014-10-08 08:15:39 +04:00
|
|
|
premultAlpha = true;
|
2014-08-28 03:16:22 +04:00
|
|
|
preserve = false;
|
|
|
|
surfaceAllocator = nullptr;
|
2013-12-03 22:44:38 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
SurfaceCaps::~SurfaceCaps()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-07-12 02:10:49 +04:00
|
|
|
} // namespace gl
|
|
|
|
} // namespace mozilla
|