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..84d580a8750afad0b854669b79d4766184d2823b |
--- /dev/null |
+++ b/components/exo/test/exo_test_helper.cc |
@@ -0,0 +1,31 @@ |
+// 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); |
+} |
+ |
+} // namespace test |
+} // namespace exo |