summaryrefslogtreecommitdiffstats
path: root/ui/gfx/compositor
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-16 18:22:10 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-16 18:22:10 +0000
commitad8ef9ac2412b8179a06984bc23f14287a8bda45 (patch)
treed380154543deb075102735bd007a73319b7a1bb7 /ui/gfx/compositor
parentc47566d1a86aec6fe5f6846015f6e6141148708b (diff)
downloadchromium_src-ad8ef9ac2412b8179a06984bc23f14287a8bda45.zip
chromium_src-ad8ef9ac2412b8179a06984bc23f14287a8bda45.tar.gz
chromium_src-ad8ef9ac2412b8179a06984bc23f14287a8bda45.tar.bz2
Add gl.dll, compositor.dll, and surface.dll.
I considered merging these into ui.dll, but the respective GYP files are pretty customized, and merging all of the special casing into ui.gyp seemed like it would just make things messy. Plus, some components only need to link to surface and not all of ui. One thing that I'm not entirely sure about is the naming convention. In this case the modules are named gl, compositor and surface instead of ui_gfx_gl, and so on. I thought about declaring UI_GFX_GL_EXPORT, but I opted for the shorter GL_EXPORT instead. I think Ben has been thinking about moving these directories out of ui/gfx/ anyways since it is a bit odd for them to live there. R=rvargas Review URL: http://codereview.chromium.org/7645004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/compositor')
-rw-r--r--ui/gfx/compositor/compositor.gyp6
-rw-r--r--ui/gfx/compositor/compositor.h5
-rw-r--r--ui/gfx/compositor/compositor_export.h26
-rw-r--r--ui/gfx/compositor/compositor_gl.h4
-rw-r--r--ui/gfx/compositor/layer.h2
-rw-r--r--ui/gfx/compositor/layer_animator.h3
6 files changed, 39 insertions, 7 deletions
diff --git a/ui/gfx/compositor/compositor.gyp b/ui/gfx/compositor/compositor.gyp
index 010f973..e8cbb3b 100644
--- a/ui/gfx/compositor/compositor.gyp
+++ b/ui/gfx/compositor/compositor.gyp
@@ -22,16 +22,20 @@
'targets': [
{
'target_name': 'compositor',
- 'type': 'static_library',
+ 'type': '<(component)',
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/ui/gfx/gl/gl.gyp:gl',
'<(DEPTH)/ui/ui.gyp:ui',
],
+ 'defines': [
+ 'COMPOSITOR_IMPLEMENTATION',
+ ],
'sources': [
'compositor.cc',
'compositor.h',
+ 'compositor_export.h',
'compositor_gl.cc',
'compositor_gl.h',
'compositor_win.cc',
diff --git a/ui/gfx/compositor/compositor.h b/ui/gfx/compositor/compositor.h
index bd28bda..df575dd 100644
--- a/ui/gfx/compositor/compositor.h
+++ b/ui/gfx/compositor/compositor.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/memory/ref_counted.h"
+#include "ui/gfx/compositor/compositor_export.h"
#include "ui/gfx/transform.h"
#include "ui/gfx/native_widget_types.h"
@@ -40,7 +41,7 @@ struct TextureDrawParams {
// the bitmap.
//
// Views own the Texture.
-class Texture : public base::RefCounted<Texture> {
+class COMPOSITOR_EXPORT Texture : public base::RefCounted<Texture> {
public:
// Sets the canvas of this texture. The origin is at |origin|.
// |overall_size| gives the total size of texture.
@@ -67,7 +68,7 @@ class Texture : public base::RefCounted<Texture> {
// displayable form of pixels comprising a single widget's contents. It draws an
// appropriately transformed texture for each transformed view in the widget's
// view hierarchy.
-class Compositor : public base::RefCounted<Compositor> {
+class COMPOSITOR_EXPORT Compositor : public base::RefCounted<Compositor> {
public:
// Create a compositor from the provided handle.
static Compositor* Create(gfx::AcceleratedWidget widget,
diff --git a/ui/gfx/compositor/compositor_export.h b/ui/gfx/compositor/compositor_export.h
new file mode 100644
index 0000000..2b1440b
--- /dev/null
+++ b/ui/gfx/compositor/compositor_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_COMPOSITOR_COMPOSITOR_EXPORT_H_
+#define UI_GFX_COMPOSITOR_COMPOSITOR_EXPORT_H_
+#pragma once
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(COMPOSITOR_IMPLEMENTATION)
+#define COMPOSITOR_EXPORT __declspec(dllexport)
+#else
+#define COMPOSITOR_EXPORT __declspec(dllimport)
+#endif // defined(COMPOSITOR_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#define COMPOSITOR_EXPORT __attribute__((visibility("default")))
+#endif
+
+#else // defined(COMPONENT_BUILD)
+#define COMPOSITOR_EXPORT
+#endif
+
+#endif // UI_GFX_COMPOSITOR_COMPOSITOR_EXPORT_H_
diff --git a/ui/gfx/compositor/compositor_gl.h b/ui/gfx/compositor/compositor_gl.h
index 9699955..0872d1e 100644
--- a/ui/gfx/compositor/compositor_gl.h
+++ b/ui/gfx/compositor/compositor_gl.h
@@ -22,7 +22,7 @@ namespace ui {
class CompositorGL;
class TextureProgramGL;
-class TextureGL : public Texture {
+class COMPOSITOR_EXPORT TextureGL : public Texture {
public:
explicit TextureGL(CompositorGL* compositor);
@@ -56,7 +56,7 @@ class TextureGL : public Texture {
DISALLOW_COPY_AND_ASSIGN(TextureGL);
};
-class CompositorGL : public Compositor {
+class COMPOSITOR_EXPORT CompositorGL : public Compositor {
public:
CompositorGL(gfx::AcceleratedWidget widget, const gfx::Size& size);
virtual ~CompositorGL();
diff --git a/ui/gfx/compositor/layer.h b/ui/gfx/compositor/layer.h
index 6e2438a..7bbc890 100644
--- a/ui/gfx/compositor/layer.h
+++ b/ui/gfx/compositor/layer.h
@@ -26,7 +26,7 @@ class Texture;
// NOTE: unlike Views, each Layer does *not* own its children views. If you
// delete a Layer and it has children, the parent of each child layer is set to
// NULL, but the children are not deleted.
-class Layer {
+class COMPOSITOR_EXPORT Layer {
public:
explicit Layer(Compositor* compositor);
~Layer();
diff --git a/ui/gfx/compositor/layer_animator.h b/ui/gfx/compositor/layer_animator.h
index c30ba87..4570e26 100644
--- a/ui/gfx/compositor/layer_animator.h
+++ b/ui/gfx/compositor/layer_animator.h
@@ -14,6 +14,7 @@
#include "third_party/skia/include/utils/SkMatrix44.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/tween.h"
+#include "ui/gfx/compositor/compositor_export.h"
#include "ui/gfx/point.h"
namespace ui {
@@ -23,7 +24,7 @@ class MultiAnimation;
class Transform;
// LayerAnimator manages animating various properties of a Layer.
-class LayerAnimator : public ui::AnimationDelegate {
+class COMPOSITOR_EXPORT LayerAnimator : public ui::AnimationDelegate {
public:
explicit LayerAnimator(Layer* layer);
virtual ~LayerAnimator();