Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: components/exo/test/exo_test_helper.cc

Issue 1412093006: components: Add Exosphere component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove some ifdefs Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/exo/test/exo_test_helper.h ('k') | components/exo/test/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « components/exo/test/exo_test_helper.h ('k') | components/exo/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698