diff options
Diffstat (limited to 'ui/gfx/surface')
-rw-r--r-- | ui/gfx/surface/accelerated_surface_linux.h | 4 | ||||
-rw-r--r-- | ui/gfx/surface/accelerated_surface_mac.h | 3 | ||||
-rw-r--r-- | ui/gfx/surface/accelerated_surface_wayland.h | 4 | ||||
-rw-r--r-- | ui/gfx/surface/io_surface_support_mac.h | 5 | ||||
-rw-r--r-- | ui/gfx/surface/surface.gyp | 6 | ||||
-rw-r--r-- | ui/gfx/surface/surface_export.h | 26 | ||||
-rw-r--r-- | ui/gfx/surface/transport_dib.h | 5 |
7 files changed, 45 insertions, 8 deletions
diff --git a/ui/gfx/surface/accelerated_surface_linux.h b/ui/gfx/surface/accelerated_surface_linux.h index b905712..e7882b8 100644 --- a/ui/gfx/surface/accelerated_surface_linux.h +++ b/ui/gfx/surface/accelerated_surface_linux.h @@ -8,10 +8,12 @@ #include "base/memory/ref_counted.h" #include "ui/gfx/size.h" +#include "ui/gfx/surface/surface_export.h" // The GL context associated with the surface must be current when // an instance is created or destroyed. -class AcceleratedSurface : public base::RefCounted<AcceleratedSurface> { +class SURFACE_EXPORT AcceleratedSurface + : public base::RefCounted<AcceleratedSurface> { public: AcceleratedSurface(const gfx::Size& size); const gfx::Size& size() const { return size_; } diff --git a/ui/gfx/surface/accelerated_surface_mac.h b/ui/gfx/surface/accelerated_surface_mac.h index ad133a8..5163a57 100644 --- a/ui/gfx/surface/accelerated_surface_mac.h +++ b/ui/gfx/surface/accelerated_surface_mac.h @@ -15,6 +15,7 @@ #include "ui/gfx/size.h" #include "ui/gfx/gl/gl_context.h" #include "ui/gfx/gl/gl_surface.h" +#include "ui/gfx/surface/surface_export.h" #include "ui/gfx/surface/transport_dib.h" // Should not include GL headers in a header file. Forward declare these types @@ -32,7 +33,7 @@ class Rect; // uses a regular dib. There will either be an IOSurface or a TransportDIB, // never both. -class AcceleratedSurface { +class SURFACE_EXPORT AcceleratedSurface { public: AcceleratedSurface(); virtual ~AcceleratedSurface(); diff --git a/ui/gfx/surface/accelerated_surface_wayland.h b/ui/gfx/surface/accelerated_surface_wayland.h index c4418e4..3deda3c 100644 --- a/ui/gfx/surface/accelerated_surface_wayland.h +++ b/ui/gfx/surface/accelerated_surface_wayland.h @@ -8,12 +8,14 @@ #include "base/memory/ref_counted.h" #include "ui/gfx/size.h" +#include "ui/gfx/surface/surface_export.h" struct wl_egl_pixmap; // The GL context associated with the surface must be current when // an instance is created or destroyed. -class AcceleratedSurface : public base::RefCounted<AcceleratedSurface> { +class SURFACE_EXPORT AcceleratedSurface + : public base::RefCounted<AcceleratedSurface> { public: AcceleratedSurface(const gfx::Size& size); const gfx::Size& size() const { return size_; } diff --git a/ui/gfx/surface/io_surface_support_mac.h b/ui/gfx/surface/io_surface_support_mac.h index e8d01b9..b49dbfe 100644 --- a/ui/gfx/surface/io_surface_support_mac.h +++ b/ui/gfx/surface/io_surface_support_mac.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -11,6 +11,7 @@ #include <OpenGL/OpenGL.h> #include "base/basictypes.h" +#include "ui/gfx/surface/surface_export.h" // This Mac OS X-specific class provides dynamically-linked access to // IOSurface.framework, which is only available on 10.6 and later. @@ -20,7 +21,7 @@ // See IOSurface/IOSurfaceAPI.h and OpenGL/CGLIOSurface.h on 10.6 for // documentation of the fields and methods of this class. -class IOSurfaceSupport { +class SURFACE_EXPORT IOSurfaceSupport { public: // Returns an instance of the IOSurfaceSupport class if the // operating system supports it, NULL otherwise. It is safe to call diff --git a/ui/gfx/surface/surface.gyp b/ui/gfx/surface/surface.gyp index 9e7081d..231dcbb 100644 --- a/ui/gfx/surface/surface.gyp +++ b/ui/gfx/surface/surface.gyp @@ -19,7 +19,7 @@ 'targets': [ { 'target_name': 'surface', - 'type': 'static_library', + 'type': '<(component)', 'dependencies': [ '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/skia/skia.gyp:skia', @@ -35,11 +35,15 @@ 'accelerated_surface_wayland.h', 'io_surface_support_mac.cc', 'io_surface_support_mac.h', + 'surface_export.h', 'transport_dib.h', 'transport_dib_linux.cc', 'transport_dib_mac.cc', 'transport_dib_win.cc', ], + 'defines': [ + 'SURFACE_IMPLEMENTATION', + ], 'conditions': [ ['use_wayland == 1', { 'sources/': [ diff --git a/ui/gfx/surface/surface_export.h b/ui/gfx/surface/surface_export.h new file mode 100644 index 0000000..9b8420a --- /dev/null +++ b/ui/gfx/surface/surface_export.h @@ -0,0 +1,26 @@ +// Copyright (c) 2011 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 UI_GFX_SURFACE_SURFACE_EXPORT_H_ +#define UI_GFX_SURFACE_SURFACE_EXPORT_H_ +#pragma once + +#if defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(SURFACE_IMPLEMENTATION) +#define SURFACE_EXPORT __declspec(dllexport) +#else +#define SURFACE_EXPORT __declspec(dllimport) +#endif // defined(SURFACE_IMPLEMENTATION) + +#else // defined(WIN32) +#define SURFACE_EXPORT __attribute__((visibility("default"))) +#endif + +#else // defined(COMPONENT_BUILD) +#define SURFACE_EXPORT +#endif + +#endif // UI_GFX_SURFACE_SURFACE_EXPORT_H_ diff --git a/ui/gfx/surface/transport_dib.h b/ui/gfx/surface/transport_dib.h index 1834eec..6a8d0e0 100644 --- a/ui/gfx/surface/transport_dib.h +++ b/ui/gfx/surface/transport_dib.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -7,6 +7,7 @@ #pragma once #include "base/basictypes.h" +#include "ui/gfx/surface/surface_export.h" #if defined(OS_WIN) || defined(OS_MACOSX) #include "base/shared_memory.h" @@ -27,7 +28,7 @@ class PlatformCanvas; // between processes: from the renderer process to the browser, and // between renderer and plugin processes. // ----------------------------------------------------------------------------- -class TransportDIB { +class SURFACE_EXPORT TransportDIB { public: ~TransportDIB(); |