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

Unified Diff: cc/test/test_image_factory.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 months 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 | « cc/test/test_image_factory.h ('k') | cc/test/test_in_process_context_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_image_factory.cc
diff --git a/cc/test/test_image_factory.cc b/cc/test/test_image_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..42e35026dabc71ecae92915f78ff59464f063696
--- /dev/null
+++ b/cc/test/test_image_factory.cc
@@ -0,0 +1,33 @@
+// Copyright 2014 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 "cc/test/test_image_factory.h"
+
+#include "ui/gl/gl_image_shared_memory.h"
+
+namespace cc {
+
+TestImageFactory::TestImageFactory() {
+}
+
+TestImageFactory::~TestImageFactory() {
+}
+
+scoped_refptr<gfx::GLImage> TestImageFactory::CreateImageForGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ gfx::GpuMemoryBuffer::Format format,
+ unsigned internalformat,
+ int client_id) {
+ DCHECK_EQ(handle.type, gfx::SHARED_MEMORY_BUFFER);
+
+ scoped_refptr<gfx::GLImageSharedMemory> image(
+ new gfx::GLImageSharedMemory(size, internalformat));
+ if (!image->Initialize(handle, format))
+ return nullptr;
+
+ return image;
+}
+
+} // namespace cc
« no previous file with comments | « cc/test/test_image_factory.h ('k') | cc/test/test_in_process_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698