Commit e0e2743d authored by rvargas@google.com's avatar rvargas@google.com

Revert 96982 - 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

TBR=darin@chromium.org
Review URL: http://codereview.chromium.org/7659015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96997 0039d316-1c4b-4281-b951-d872f2087c98
parent dd248d9a
......@@ -660,8 +660,6 @@
],
'defines': [
'<@(nacl_win64_defines)',
# Required to build gl_switches.cc as part of this binary.
'GL_IMPLEMENTATION'
],
'sources': [
'app/chrome_command_ids.h',
......
......@@ -6,6 +6,7 @@
#define MEDIA_VIDEO_PICTURE_H_
#include "base/basictypes.h"
#include "ui/gfx/gl/gl_context.h"
#include "ui/gfx/size.h"
namespace media {
......
......@@ -22,20 +22,16 @@
'targets': [
{
'target_name': 'compositor',
'type': '<(component)',
'type': 'static_library',
'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',
......
......@@ -7,7 +7,6 @@
#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"
......@@ -41,7 +40,7 @@ struct TextureDrawParams {
// the bitmap.
//
// Views own the Texture.
class COMPOSITOR_EXPORT Texture : public base::RefCounted<Texture> {
class 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.
......@@ -68,7 +67,7 @@ class COMPOSITOR_EXPORT 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_EXPORT Compositor : public base::RefCounted<Compositor> {
class Compositor : public base::RefCounted<Compositor> {
public:
// Create a compositor from the provided handle.
static Compositor* Create(gfx::AcceleratedWidget widget,
......
// 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_
......@@ -22,7 +22,7 @@ namespace ui {
class CompositorGL;
class TextureProgramGL;
class COMPOSITOR_EXPORT TextureGL : public Texture {
class TextureGL : public Texture {
public:
explicit TextureGL(CompositorGL* compositor);
......@@ -56,7 +56,7 @@ class COMPOSITOR_EXPORT TextureGL : public Texture {
DISALLOW_COPY_AND_ASSIGN(TextureGL);
};
class COMPOSITOR_EXPORT CompositorGL : public Compositor {
class CompositorGL : public Compositor {
public:
CompositorGL(gfx::AcceleratedWidget widget, const gfx::Size& size);
virtual ~CompositorGL();
......
......@@ -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 COMPOSITOR_EXPORT Layer {
class Layer {
public:
explicit Layer(Compositor* compositor);
~Layer();
......
......@@ -14,7 +14,6 @@
#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 {
......@@ -24,7 +23,7 @@ class MultiAnimation;
class Transform;
// LayerAnimator manages animating various properties of a Layer.
class COMPOSITOR_EXPORT LayerAnimator : public ui::AnimationDelegate {
class LayerAnimator : public ui::AnimationDelegate {
public:
explicit LayerAnimator(Layer* layer);
virtual ~LayerAnimator();
......
......@@ -486,7 +486,7 @@ def GenerateHeader(file, functions, set_name):
# declaration.
file.write('\n')
for [return_type, names, arguments] in functions:
file.write('GL_EXPORT extern %sProc g_%s;\n' % (names[0], names[0]))
file.write('extern %sProc g_%s;\n' % (names[0], names[0]))
file.write('\n')
file.write( '} // namespace gfx\n')
......
......@@ -10,7 +10,7 @@
'targets': [
{
'target_name': 'gl',
'type': '<(component)',
'type': 'static_library',
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/skia/skia.gyp:skia',
......@@ -19,9 +19,6 @@
'variables': {
'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gl',
},
'defines': [
'GL_IMPLEMENTATION',
],
'include_dirs': [
'<(DEPTH)/third_party/swiftshader/include',
'<(DEPTH)/third_party/mesa/MesaLib/include',
......@@ -46,7 +43,6 @@
'gl_context_stub.cc',
'gl_context_stub.h',
'gl_context_win.cc',
'gl_export.h',
'gl_implementation.cc',
'gl_implementation.h',
'gl_implementation_linux.cc',
......
......@@ -16,7 +16,6 @@
#include "build/build_config.h"
#include "base/logging.h"
#include "ui/gfx/gl/gl_export.h"
// The standard OpenGL native extension headers are also included.
#if defined(OS_WIN)
......
......@@ -6,13 +6,11 @@
#define UI_GFX_GL_GL_BINDINGS_SKIA_IN_PROCESS_H_
#pragma once
#include "ui/gfx/gl/gl_export.h"
namespace gfx {
// The GPU back-end for skia requires pointers to GL functions. This function
// binds skia-gpu to the in-process GL
GL_EXPORT void BindSkiaToInProcessGL();
void BindSkiaToInProcessGL();
}
......
......@@ -17,7 +17,7 @@ namespace gfx {
class GLSurface;
// Encapsulates an OpenGL context, hiding platform specific management.
class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
class GLContext : public base::RefCounted<GLContext> {
public:
explicit GLContext(GLShareGroup* share_group);
......
......@@ -11,7 +11,7 @@
namespace gfx {
// A GLContext that does nothing for unit tests.
class GL_EXPORT GLContextStub : public GLContext {
class GLContextStub : public GLContext {
public:
GLContextStub();
virtual ~GLContextStub();
......
// 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_GL_GL_EXPORT_H_
#define UI_GFX_GL_GL_EXPORT_H_
#pragma once
#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(GL_IMPLEMENTATION)
#define GL_EXPORT __declspec(dllexport)
#else
#define GL_EXPORT __declspec(dllimport)
#endif // defined(GL_IMPLEMENTATION)
#else // defined(WIN32)
#define GL_EXPORT __attribute__((visibility("default")))
#endif
#else // defined(COMPONENT_BUILD)
#define GL_EXPORT
#endif
#endif // UI_GFX_GL_GL_EXPORT_H_
......@@ -10,7 +10,6 @@
#include "base/native_library.h"
#include "build/build_config.h"
#include "ui/gfx/gl/gl_export.h"
#include "ui/gfx/gl/gl_switches.h"
namespace gfx {
......@@ -31,7 +30,7 @@ typedef void* (*GLGetProcAddressProc)(const char* name);
#endif
// Initialize a particular GL implementation.
GL_EXPORT bool InitializeGLBindings(GLImplementation implementation);
bool InitializeGLBindings(GLImplementation implementation);
// Initialize Debug logging wrappers for GL bindings.
void InitializeDebugGLBindings();
......@@ -40,7 +39,7 @@ void InitializeDebugGLBindings();
void SetGLImplementation(GLImplementation implementation);
// Get the current GL implementation.
GL_EXPORT GLImplementation GetGLImplementation();
GLImplementation GetGLImplementation();
// Get the GL implementation with a given name.
GLImplementation GetNamedGLImplementation(const std::wstring& name);
......
......@@ -14,7 +14,7 @@
namespace gfx {
class GL_EXPORT GLInterface {
class GLInterface {
public:
virtual ~GLInterface() {
}
......
......@@ -10,14 +10,13 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "ui/gfx/gl/gl_export.h"
namespace gfx {
class GLContext;
// A group of GL contexts that share an ID namespace.
class GL_EXPORT GLShareGroup : public base::RefCounted<GLShareGroup> {
class GLShareGroup : public base::RefCounted<GLShareGroup> {
public:
GLShareGroup();
......
......@@ -8,7 +8,6 @@
#include "base/memory/ref_counted.h"
#include "build/build_config.h"
#include "ui/gfx/gl/gl_export.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
......@@ -18,7 +17,7 @@ class GLContext;
// Encapsulates a surface that can be rendered to with GL, hiding platform
// specific management.
class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
class GLSurface : public base::RefCounted<GLSurface> {
public:
GLSurface();
......
......@@ -29,7 +29,7 @@ typedef struct _XDisplay* EGLNativeDisplayType;
namespace gfx {
// Interface for EGL surface.
class GL_EXPORT GLSurfaceEGL : public GLSurface {
class GLSurfaceEGL : public GLSurface {
public:
GLSurfaceEGL();
virtual ~GLSurfaceEGL();
......
......@@ -8,14 +8,13 @@
#include "ui/gfx/gl/gl_surface.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/gl/gl_export.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
namespace gfx {
// Base class for GLX surfaces.
class GL_EXPORT GLSurfaceGLX : public GLSurface {
class GLSurfaceGLX : public GLSurface {
public:
GLSurfaceGLX();
virtual ~GLSurfaceGLX();
......
......@@ -11,7 +11,7 @@
namespace gfx {
// A GLSurface that does nothing for unit tests.
class GL_EXPORT GLSurfaceStub : public GLSurface {
class GLSurfaceStub : public GLSurface {
public:
virtual ~GLSurfaceStub();
......
......@@ -8,25 +8,23 @@
#define UI_GFX_GL_GL_SWITCHES_H_
#pragma once
#include "ui/gfx/gl/gl_export.h"
namespace gfx {
// The GL implementation names that can be passed to --use-gl.
GL_EXPORT extern const char kGLImplementationDesktopName[];
GL_EXPORT extern const char kGLImplementationOSMesaName[];
GL_EXPORT extern const char kGLImplementationEGLName[];
extern const char kGLImplementationDesktopName[];
extern const char kGLImplementationOSMesaName[];
extern const char kGLImplementationEGLName[];
extern const char kGLImplementationMockName[];
} // namespace gfx
namespace switches {
GL_EXPORT extern const char kDisableGpuVsync[];
GL_EXPORT extern const char kEnableGPUServiceLogging[];
GL_EXPORT extern const char kEnableGPUClientLogging[];
GL_EXPORT extern const char kGpuNoContextLost[];
GL_EXPORT extern const char kUseGL[];
extern const char kDisableGpuVsync[];
extern const char kEnableGPUServiceLogging[];
extern const char kEnableGPUClientLogging[];
extern const char kGpuNoContextLost[];
extern const char kUseGL[];
} // namespace switches
......
......@@ -8,12 +8,10 @@
#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 SURFACE_EXPORT AcceleratedSurface
: public base::RefCounted<AcceleratedSurface> {
class AcceleratedSurface : public base::RefCounted<AcceleratedSurface> {
public:
AcceleratedSurface(const gfx::Size& size);
const gfx::Size& size() const { return size_; }
......
......@@ -15,7 +15,6 @@
#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
......@@ -33,7 +32,7 @@ class Rect;
// uses a regular dib. There will either be an IOSurface or a TransportDIB,
// never both.
class SURFACE_EXPORT AcceleratedSurface {
class AcceleratedSurface {
public:
AcceleratedSurface();
virtual ~AcceleratedSurface();
......
......@@ -8,14 +8,12 @@
#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 SURFACE_EXPORT AcceleratedSurface
: public base::RefCounted<AcceleratedSurface> {
class AcceleratedSurface : public base::RefCounted<AcceleratedSurface> {
public:
AcceleratedSurface(const gfx::Size& size);
const gfx::Size& size() const { return size_; }
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// 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.
......@@ -11,7 +11,6 @@
#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.
......@@ -21,7 +20,7 @@
// See IOSurface/IOSurfaceAPI.h and OpenGL/CGLIOSurface.h on 10.6 for
// documentation of the fields and methods of this class.
class SURFACE_EXPORT IOSurfaceSupport {
class IOSurfaceSupport {
public:
// Returns an instance of the IOSurfaceSupport class if the
// operating system supports it, NULL otherwise. It is safe to call
......
......@@ -19,7 +19,7 @@
'targets': [
{
'target_name': 'surface',
'type': '<(component)',
'type': 'static_library',
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/skia/skia.gyp:skia',
......@@ -35,15 +35,11 @@
'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/': [
......
// 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_
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// 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.
......@@ -7,7 +7,6 @@
#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"
......@@ -28,7 +27,7 @@ class PlatformCanvas;
// between processes: from the renderer process to the browser, and
// between renderer and plugin processes.
// -----------------------------------------------------------------------------
class SURFACE_EXPORT TransportDIB {
class TransportDIB {
public:
~TransportDIB();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment