Infer appropriate GNU_STACK alignment for a shared library.
[chromium-blink-merge.git] / cc / test / test_image_factory.cc
blob42e35026dabc71ecae92915f78ff59464f063696
1 // Copyright 2014 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.
5 #include "cc/test/test_image_factory.h"
7 #include "ui/gl/gl_image_shared_memory.h"
9 namespace cc {
11 TestImageFactory::TestImageFactory() {
14 TestImageFactory::~TestImageFactory() {
17 scoped_refptr<gfx::GLImage> TestImageFactory::CreateImageForGpuMemoryBuffer(
18 const gfx::GpuMemoryBufferHandle& handle,
19 const gfx::Size& size,
20 gfx::GpuMemoryBuffer::Format format,
21 unsigned internalformat,
22 int client_id) {
23 DCHECK_EQ(handle.type, gfx::SHARED_MEMORY_BUFFER);
25 scoped_refptr<gfx::GLImageSharedMemory> image(
26 new gfx::GLImageSharedMemory(size, internalformat));
27 if (!image->Initialize(handle, format))
28 return nullptr;
30 return image;
33 } // namespace cc