| Index: components/exo/test/exo_test_helper.cc
|
| diff --git a/components/exo/test/exo_test_helper.cc b/components/exo/test/exo_test_helper.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3cbf6eacf48b8491de479ae93734f98c52eca028
|
| --- /dev/null
|
| +++ b/components/exo/test/exo_test_helper.cc
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/exo/test/exo_test_helper.h"
|
| +
|
| +#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
|
| +#include "ui/aura/env.h"
|
| +#include "ui/compositor/compositor.h"
|
| +
|
| +namespace exo {
|
| +namespace test {
|
| +
|
| +////////////////////////////////////////////////////////////////////////////////
|
| +// ExoTestHelper, public:
|
| +
|
| +ExoTestHelper::ExoTestHelper() {}
|
| +
|
| +ExoTestHelper::~ExoTestHelper() {}
|
| +
|
| +scoped_ptr<gfx::GpuMemoryBuffer> ExoTestHelper::CreateGpuMemoryBuffer(
|
| + const gfx::Size& size) {
|
| + return aura::Env::GetInstance()
|
| + ->context_factory()
|
| + ->GetGpuMemoryBufferManager()
|
| + ->AllocateGpuMemoryBuffer(size, gfx::BufferFormat::RGBA_8888,
|
| + gfx::BufferUsage::GPU_READ)
|
| + .Pass();
|
| +}
|
| +
|
| +} // namespace test
|
| +} // namespace exo
|
|
|