michael@0: /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "TextureHostBasic.h" michael@0: #include "MacIOSurfaceTextureHostBasic.h" michael@0: michael@0: using namespace mozilla::gl; michael@0: using namespace mozilla::gfx; michael@0: michael@0: namespace mozilla { michael@0: namespace layers { michael@0: michael@0: TemporaryRef michael@0: CreateTextureHostBasic(const SurfaceDescriptor& aDesc, michael@0: ISurfaceAllocator* aDeallocator, michael@0: TextureFlags aFlags) michael@0: { michael@0: #ifdef XP_MACOSX michael@0: if (aDesc.type() == SurfaceDescriptor::TSurfaceDescriptorMacIOSurface) { michael@0: const SurfaceDescriptorMacIOSurface& desc = michael@0: aDesc.get_SurfaceDescriptorMacIOSurface(); michael@0: RefPtr result = new MacIOSurfaceTextureHostBasic(aFlags, desc); michael@0: return result; michael@0: } michael@0: #endif michael@0: return CreateBackendIndependentTextureHost(aDesc, aDeallocator, aFlags); michael@0: } michael@0: michael@0: } // namespace layers michael@0: } // namespace gfx