2013-12-03 10:44:38 -08: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-11 15:10:49 -07:00
|
|
|
|
2013-12-03 10:44:38 -08:00
|
|
|
#include "mozilla/layers/ISurfaceAllocator.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
2014-07-11 15:10:49 -07:00
|
|
|
namespace gl {
|
2013-12-03 10:44:38 -08:00
|
|
|
|
|
|
|
SurfaceCaps::SurfaceCaps()
|
|
|
|
{
|
2014-08-27 16:16:22 -07:00
|
|
|
Clear();
|
2013-12-03 10:44:38 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
SurfaceCaps::SurfaceCaps(const SurfaceCaps& other)
|
|
|
|
{
|
2014-08-27 16:16:22 -07:00
|
|
|
*this = other;
|
2013-12-03 10:44:38 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
SurfaceCaps&
|
|
|
|
SurfaceCaps::operator=(const SurfaceCaps& other)
|
|
|
|
{
|
2014-08-27 16:16:22 -07:00
|
|
|
any = other.any;
|
|
|
|
color = other.color;
|
|
|
|
alpha = other.alpha;
|
|
|
|
bpp16 = other.bpp16;
|
|
|
|
depth = other.depth;
|
|
|
|
stencil = other.stencil;
|
|
|
|
antialias = other.antialias;
|
|
|
|
preserve = other.preserve;
|
|
|
|
surfaceAllocator = other.surfaceAllocator;
|
|
|
|
|
|
|
|
return *this;
|
2013-12-03 10:44:38 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SurfaceCaps::Clear()
|
|
|
|
{
|
2014-08-27 16:16:22 -07:00
|
|
|
any = false;
|
|
|
|
color = false;
|
|
|
|
alpha = false;
|
|
|
|
bpp16 = false;
|
|
|
|
depth = false;
|
|
|
|
stencil = false;
|
|
|
|
antialias = false;
|
|
|
|
preserve = false;
|
|
|
|
surfaceAllocator = nullptr;
|
2013-12-03 10:44:38 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
SurfaceCaps::~SurfaceCaps()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-07-11 15:10:49 -07:00
|
|
|
} // namespace gl
|
|
|
|
} // namespace mozilla
|