Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "components/exo/test/exo_test_helper.h" | |
| 6 | |
| 7 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" | |
| 8 #include "ui/aura/env.h" | |
| 9 #include "ui/compositor/compositor.h" | |
| 10 | |
| 11 namespace exo { | |
| 12 namespace test { | |
| 13 | |
| 14 //////////////////////////////////////////////////////////////////////////////// | |
| 15 // ExoTestHelper, public: | |
| 16 | |
| 17 ExoTestHelper::ExoTestHelper() {} | |
| 18 | |
| 19 ExoTestHelper::~ExoTestHelper() {} | |
| 20 | |
| 21 scoped_ptr<gfx::GpuMemoryBuffer> ExoTestHelper::CreateGpuMemoryBuffer( | |
| 22 const gfx::Size& size) { | |
| 23 return aura::Env::GetInstance() | |
| 24 ->context_factory() | |
| 25 ->GetGpuMemoryBufferManager() | |
| 26 ->AllocateGpuMemoryBuffer(size, gfx::BufferFormat::RGBA_8888, | |
| 27 gfx::BufferUsage::GPU_READ) | |
| 28 .Pass(); | |
|
piman
2015/11/18 04:31:51
nit: should not need Pass()
reveman
2015/11/18 06:48:35
Done.
| |
| 29 } | |
| 30 | |
| 31 } // namespace test | |
| 32 } // namespace exo | |
| OLD | NEW |