summaryrefslogtreecommitdiffstats
path: root/app/surface/io_surface_support_mac.h
diff options
context:
space:
mode:
authorbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 14:04:12 +0000
committerbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 14:04:12 +0000
commitb9b751f2681d39b11a692a655eb16a9e1e4eba97 (patch)
treeef152fd04b0a9730f9088aa1b968e6096097127e /app/surface/io_surface_support_mac.h
parent13ffb98bc729794380228ebdc09b18687d2d1d74 (diff)
downloadchromium_src-b9b751f2681d39b11a692a655eb16a9e1e4eba97.zip
chromium_src-b9b751f2681d39b11a692a655eb16a9e1e4eba97.tar.gz
chromium_src-b9b751f2681d39b11a692a655eb16a9e1e4eba97.tar.bz2
Refactor: Move app/surface to ui/gfx/surface.
This is progress towards moving app/gfx/gl to ui/gfx/gl. Currently, surface depends on gl, but gl depends on app_base (which contains surface). This refactor gets rid of this potential cyclic dependency. surface.gyp is in a separate file (not a .gypi include) because cyclic dependency checking is at the file level (not target level). BUG=none TEST=by hand and try bots Review URL: http://codereview.chromium.org/6718027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79396 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/surface/io_surface_support_mac.h')
-rw-r--r--app/surface/io_surface_support_mac.h70
1 files changed, 0 insertions, 70 deletions
diff --git a/app/surface/io_surface_support_mac.h b/app/surface/io_surface_support_mac.h
deleted file mode 100644
index 82dccca..0000000
--- a/app/surface/io_surface_support_mac.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2010 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.
-
-#ifndef APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_
-#define APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_
-#pragma once
-
-#include <CoreFoundation/CoreFoundation.h>
-#include <mach/mach.h>
-#include <OpenGL/OpenGL.h>
-
-#include "base/basictypes.h"
-
-// This Mac OS X-specific class provides dynamically-linked access to
-// IOSurface.framework, which is only available on 10.6 and later.
-// Since Chromium is built on 10.5 we must dynamically look up all of
-// the entry points we need in this framework.
-
-// See IOSurface/IOSurfaceAPI.h and OpenGL/CGLIOSurface.h on 10.6 for
-// documentation of the fields and methods of this class.
-
-class IOSurfaceSupport {
- public:
- // Returns an instance of the IOSurfaceSupport class if the
- // operating system supports it, NULL otherwise. It is safe to call
- // this multiple times.
- static IOSurfaceSupport* Initialize();
-
- virtual CFStringRef GetKIOSurfaceWidth() = 0;
- virtual CFStringRef GetKIOSurfaceHeight() = 0;
- virtual CFStringRef GetKIOSurfaceBytesPerElement() = 0;
- virtual CFStringRef GetKIOSurfaceIsGlobal() = 0;
-
- virtual CFTypeRef IOSurfaceCreate(CFDictionaryRef properties) = 0;
-
- // The following two APIs assume the IOSurface was created with the
- // kIOSurfaceIsGlobal key set to true
- virtual uint32 IOSurfaceGetID(CFTypeRef io_surface) = 0;
- virtual CFTypeRef IOSurfaceLookup(uint32 io_surface_id) = 0;
-
- // The following two APIs are more robust and secure, but
- // unfortunately it looks like it will be a lot of work to correctly
- // transmit a mach port from process to process (possibly requiring
- // a side channel for or extension of the Chrome IPC mechanism)
- virtual mach_port_t IOSurfaceCreateMachPort(CFTypeRef io_surface) = 0;
- virtual CFTypeRef IOSurfaceLookupFromMachPort(mach_port_t port) = 0;
-
- virtual size_t IOSurfaceGetWidth(CFTypeRef io_surface) = 0;
- virtual size_t IOSurfaceGetHeight(CFTypeRef io_surface) = 0;
-
- virtual CGLError CGLTexImageIOSurface2D(CGLContextObj ctx,
- GLenum target,
- GLenum internal_format,
- GLsizei width,
- GLsizei height,
- GLenum format,
- GLenum type,
- CFTypeRef io_surface,
- GLuint plane) = 0;
-
- protected:
- IOSurfaceSupport();
- virtual ~IOSurfaceSupport();
-
- DISALLOW_COPY_AND_ASSIGN(IOSurfaceSupport);
-};
-
-#endif // APP_SURFACE_IO_SURFACE_SUPPORT_MAC_H_
-