diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 17:37:36 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 17:37:36 +0000 |
commit | fe377e179b83f77f0ad65150f22d1b2a07f516dc (patch) | |
tree | b448d81085dbe2764ee51b4e3c683ed9c589b03d /ui/gfx/compositor | |
parent | 07890d18d5874d213d3ddfa80ef80f0742ab699b (diff) | |
download | chromium_src-fe377e179b83f77f0ad65150f22d1b2a07f516dc.zip chromium_src-fe377e179b83f77f0ad65150f22d1b2a07f516dc.tar.gz chromium_src-fe377e179b83f77f0ad65150f22d1b2a07f516dc.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
Originally reviewed at http://codereview.chromium.org/7645004
Review URL: http://codereview.chromium.org/7659017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/compositor')
-rw-r--r-- | ui/gfx/compositor/compositor.gyp | 6 | ||||
-rw-r--r-- | ui/gfx/compositor/compositor.h | 5 | ||||
-rw-r--r-- | ui/gfx/compositor/compositor_export.h | 26 | ||||
-rw-r--r-- | ui/gfx/compositor/compositor_gl.h | 4 | ||||
-rw-r--r-- | ui/gfx/compositor/layer.h | 2 | ||||
-rw-r--r-- | ui/gfx/compositor/layer_animator.h | 3 |
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(); |