gfx/layers/PersistentBufferProvider.cpp
author Bas Schouten <bschouten@mozilla.com>
Fri, 19 Jun 2015 01:07:21 +0200
changeset 249684 54ad73e3a027524c74c2deff9bda18b65a9a536b
child 252629 91d6e262b662a0b4e47358665e222d3927337af9
permissions -rw-r--r--
Bug 1167235 - Part 1: Add code exposing a PersistentBufferProvider. r=nical

/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 * 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 "PersistentBufferProvider.h"

#include "Layers.h"
#include "mozilla/gfx/Logging.h"
#include "pratom.h"
#include "gfxPlatform.h"

namespace mozilla {

using namespace gfx;

namespace layers {

PersistentBufferProviderBasic::PersistentBufferProviderBasic(LayerManager* aManager, gfx::IntSize aSize,
                                                             gfx::SurfaceFormat aFormat, gfx::BackendType aBackend)
{
  mDrawTarget = gfxPlatform::GetPlatform()->CreateDrawTargetForBackend(aBackend, aSize, aFormat);
}

}
}