diff options
101 files changed, 316 insertions, 192 deletions
diff --git a/cc/active_animation.h b/cc/active_animation.h index 01f3a27..0839662 100644 --- a/cc/active_animation.h +++ b/cc/active_animation.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" namespace cc { @@ -15,7 +16,7 @@ class AnimationCurve; // An ActiveAnimation, contains all the state required to play an AnimationCurve. // Specifically, the affected property, the run state (paused, finished, etc.), // loop count, last pause time, and the total time spent paused. -class ActiveAnimation { +class CC_EXPORT ActiveAnimation { public: // Animations begin in one of the 'waiting' states. Animations waiting for the next tick // will start the next time the controller animates. Animations waiting for target diff --git a/cc/animation_curve.h b/cc/animation_curve.h index 386d703..5b80d8d 100644 --- a/cc/animation_curve.h +++ b/cc/animation_curve.h @@ -6,6 +6,7 @@ #define CCAnimationCurve_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include <public/WebTransformationMatrix.h> namespace cc { @@ -16,7 +17,7 @@ class TransformOperations; // An animation curve is a function that returns a value given a time. // There are currently only two types of curve, float and transform. -class AnimationCurve { +class CC_EXPORT AnimationCurve { public: enum Type { Float, Transform }; @@ -30,7 +31,7 @@ public: const TransformAnimationCurve* toTransformAnimationCurve() const; }; -class FloatAnimationCurve : public AnimationCurve { +class CC_EXPORT FloatAnimationCurve : public AnimationCurve { public: virtual ~FloatAnimationCurve() { } @@ -40,7 +41,7 @@ public: virtual Type type() const OVERRIDE; }; -class TransformAnimationCurve : public AnimationCurve { +class CC_EXPORT TransformAnimationCurve : public AnimationCurve { public: virtual ~TransformAnimationCurve() { } diff --git a/cc/bitmap_content_layer_updater.h b/cc/bitmap_content_layer_updater.h index da14817..7c833db 100644 --- a/cc/bitmap_content_layer_updater.h +++ b/cc/bitmap_content_layer_updater.h @@ -6,6 +6,7 @@ #ifndef BitmapContentLayerUpdater_h #define BitmapContentLayerUpdater_h +#include "cc/cc_export.h" #include "cc/content_layer_updater.h" class SkCanvas; @@ -17,7 +18,7 @@ class LayerPainter; // This class rasterizes the contentRect into a skia bitmap canvas. It then updates // textures by copying from the canvas into the texture, using MapSubImage if // possible. -class BitmapContentLayerUpdater : public ContentLayerUpdater { +class CC_EXPORT BitmapContentLayerUpdater : public ContentLayerUpdater { public: class Resource : public LayerUpdater::Resource { public: @@ -231,7 +231,7 @@ 'targets': [ { 'target_name': 'cc', - 'type': 'static_library', + 'type': '<(component)', 'includes': [ 'cc.gypi', ], @@ -245,10 +245,10 @@ '<(webkit_src_dir)/Source/WTF/WTF.gyp/WTF.gyp:wtf', '<(webkit_src_dir)/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore_platform_geometry', '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit_wtf_support', + '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit', ], 'defines': [ - # http://crbug.com/154052 - 'WEBKIT_GLUE_IMPLEMENTATION=1', + 'CC_IMPLEMENTATION=1', ], 'include_dirs': [ '<(webkit_src_dir)/Source/Platform/chromium', diff --git a/cc/cc_export.h b/cc/cc_export.h new file mode 100644 index 0000000..87e3c9b --- /dev/null +++ b/cc/cc_export.h @@ -0,0 +1,29 @@ +// Copyright (c) 2012 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 CC_CC_EXPORT_H_ +#define CC_CC_EXPORT_H_ + +#if defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(CC_IMPLEMENTATION) +#define CC_EXPORT __declspec(dllexport) +#else +#define CC_EXPORT __declspec(dllimport) +#endif // defined(CC_IMPLEMENTATION) + +#else // defined(WIN32) +#if defined(CC_IMPLEMENTATION) +#define CC_EXPORT __attribute__((visibility("default"))) +#else +#define CC_EXPORT +#endif +#endif + +#else // defined(COMPONENT_BUILD) +#define CC_EXPORT +#endif + +#endif // CC_CC_EXPORT_H_ diff --git a/cc/cc_tests.gyp b/cc/cc_tests.gyp index 963f841..c51556d 100644 --- a/cc/cc_tests.gyp +++ b/cc/cc_tests.gyp @@ -91,6 +91,8 @@ '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', '../third_party/WebKit/Source/WTF/WTF.gyp/WTF.gyp:wtf', + '../third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore_platform_geometry', + '../ui/ui.gyp:ui', 'cc.gyp:cc', 'cc_test_support', ], diff --git a/cc/checkerboard_draw_quad.h b/cc/checkerboard_draw_quad.h index 6a01d51..8a2ada6 100644 --- a/cc/checkerboard_draw_quad.h +++ b/cc/checkerboard_draw_quad.h @@ -6,6 +6,7 @@ #define CCCheckerboardDrawQuad_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/draw_quad.h" #include "third_party/skia/include/core/SkColor.h" @@ -13,7 +14,7 @@ namespace cc { #pragma pack(push, 4) -class CheckerboardDrawQuad : public DrawQuad { +class CC_EXPORT CheckerboardDrawQuad : public DrawQuad { public: static scoped_ptr<CheckerboardDrawQuad> create(const SharedQuadState*, const gfx::Rect&, SkColor); diff --git a/cc/content_layer.h b/cc/content_layer.h index 4b0b905..0174ee5 100644 --- a/cc/content_layer.h +++ b/cc/content_layer.h @@ -6,6 +6,7 @@ #define ContentLayerChromium_h #include "base/basictypes.h" +#include "cc/cc_export.h" #include "cc/layer_painter.h" #include "cc/tiled_layer.h" @@ -16,7 +17,7 @@ namespace cc { class ContentLayerClient; class LayerUpdater; -class ContentLayerPainter : public LayerPainter { +class CC_EXPORT ContentLayerPainter : public LayerPainter { public: static scoped_ptr<ContentLayerPainter> create(ContentLayerClient*); @@ -31,7 +32,7 @@ private: }; // A layer that renders its contents into an SkCanvas. -class ContentLayer : public TiledLayer { +class CC_EXPORT ContentLayer : public TiledLayer { public: static scoped_refptr<ContentLayer> create(ContentLayerClient*); diff --git a/cc/content_layer_updater.h b/cc/content_layer_updater.h index 2e44bf7..ae6365c 100644 --- a/cc/content_layer_updater.h +++ b/cc/content_layer_updater.h @@ -5,6 +5,7 @@ #ifndef ContentLayerUpdater_h #define ContentLayerUpdater_h +#include "cc/cc_export.h" #include "cc/layer_updater.h" class SkCanvas; @@ -16,7 +17,7 @@ class LayerPainter; // Base class for BitmapContentLayerUpdater and // SkPictureContentLayerUpdater that reduces code duplication between // their respective paintContents implementations. -class ContentLayerUpdater : public LayerUpdater { +class CC_EXPORT ContentLayerUpdater : public LayerUpdater { protected: explicit ContentLayerUpdater(scoped_ptr<LayerPainter>); virtual ~ContentLayerUpdater(); diff --git a/cc/contents_scaling_layer.h b/cc/contents_scaling_layer.h index 45497ee..d167d7f 100644 --- a/cc/contents_scaling_layer.h +++ b/cc/contents_scaling_layer.h @@ -5,13 +5,14 @@ #ifndef CC_CONTENTS_SCALING_LAYER_H #define CC_CONTENTS_SCALING_LAYER_H +#include "cc/cc_export.h" #include "cc/layer.h" namespace cc { // Base class for layers that need contents scale. // The content bounds are determined by bounds and scale of the contents. -class ContentsScalingLayer : public Layer { +class CC_EXPORT ContentsScalingLayer : public Layer { public: virtual gfx::Size contentBounds() const OVERRIDE; virtual float contentsScaleX() const OVERRIDE; diff --git a/cc/damage_tracker.h b/cc/damage_tracker.h index 4680662b..5deb731 100644 --- a/cc/damage_tracker.h +++ b/cc/damage_tracker.h @@ -7,6 +7,7 @@ #include "base/hash_tables.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "ui/gfx/rect_f.h" #include <vector> @@ -27,7 +28,7 @@ class RenderSurfaceImpl; // Computes the region where pixels have actually changed on a RenderSurfaceImpl. This region is used // to scissor what is actually drawn to the screen to save GPU computation and bandwidth. -class DamageTracker { +class CC_EXPORT DamageTracker { public: static scoped_ptr<DamageTracker> create(); ~DamageTracker(); @@ -61,6 +62,8 @@ private: gfx::RectF m_currentDamageRect; bool m_forceFullDamageNextUpdate; + + DISALLOW_COPY_AND_ASSIGN(DamageTracker); }; } // namespace cc diff --git a/cc/debug_border_draw_quad.h b/cc/debug_border_draw_quad.h index bbe47e4..d07b3e0 100644 --- a/cc/debug_border_draw_quad.h +++ b/cc/debug_border_draw_quad.h @@ -6,6 +6,7 @@ #define CCDebugBorderDrawQuad_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/draw_quad.h" #include "third_party/skia/include/core/SkColor.h" @@ -13,7 +14,7 @@ namespace cc { #pragma pack(push, 4) -class DebugBorderDrawQuad : public DrawQuad { +class CC_EXPORT DebugBorderDrawQuad : public DrawQuad { public: static scoped_ptr<DebugBorderDrawQuad> create(const SharedQuadState*, const gfx::Rect&, SkColor, int width); diff --git a/cc/delay_based_time_source.h b/cc/delay_based_time_source.h index a9229c3..542af1b 100644 --- a/cc/delay_based_time_source.h +++ b/cc/delay_based_time_source.h @@ -6,13 +6,14 @@ #define CCDelayBasedTimeSource_h #include "base/memory/weak_ptr.h" +#include "cc/cc_export.h" #include "cc/time_source.h" namespace cc { // This timer implements a time source that achieves the specified interval // in face of millisecond-precision delayed callbacks and random queueing delays. -class DelayBasedTimeSource : public TimeSource { +class CC_EXPORT DelayBasedTimeSource : public TimeSource { public: static scoped_refptr<DelayBasedTimeSource> create(base::TimeDelta interval, Thread* thread); diff --git a/cc/delegated_renderer_layer.h b/cc/delegated_renderer_layer.h index fdac4fd..f4e4f41 100644 --- a/cc/delegated_renderer_layer.h +++ b/cc/delegated_renderer_layer.h @@ -5,11 +5,12 @@ #ifndef DelegatedRendererLayerChromium_h #define DelegatedRendererLayerChromium_h +#include "cc/cc_export.h" #include "cc/layer.h" namespace cc { -class DelegatedRendererLayer : public Layer { +class CC_EXPORT DelegatedRendererLayer : public Layer { public: static scoped_refptr<DelegatedRendererLayer> create(); diff --git a/cc/delegated_renderer_layer_impl.h b/cc/delegated_renderer_layer_impl.h index a5c1c73..550b84a 100644 --- a/cc/delegated_renderer_layer_impl.h +++ b/cc/delegated_renderer_layer_impl.h @@ -5,12 +5,13 @@ #ifndef CCDelegatedRendererLayerImpl_h #define CCDelegatedRendererLayerImpl_h +#include "cc/cc_export.h" #include "cc/layer_impl.h" #include "cc/scoped_ptr_vector.h" namespace cc { -class DelegatedRendererLayerImpl : public LayerImpl { +class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl { public: static scoped_ptr<DelegatedRendererLayerImpl> create(int id) { return make_scoped_ptr(new DelegatedRendererLayerImpl(id)); } virtual ~DelegatedRendererLayerImpl(); diff --git a/cc/direct_renderer.h b/cc/direct_renderer.h index 7ba966c..b112baf 100644 --- a/cc/direct_renderer.h +++ b/cc/direct_renderer.h @@ -6,6 +6,7 @@ #define CCDirectRenderer_h #include "base/basictypes.h" +#include "cc/cc_export.h" #include "cc/renderer.h" #include "cc/resource_provider.h" #include "cc/scoped_texture.h" @@ -17,7 +18,7 @@ class ResourceProvider; // This is the base class for code shared between the GL and software // renderer implementations. "Direct" refers to the fact that it does not // delegate rendering to another compositor. -class DirectRenderer : public Renderer { +class CC_EXPORT DirectRenderer : public Renderer { public: virtual ~DirectRenderer(); diff --git a/cc/draw_quad.h b/cc/draw_quad.h index 505c019..5594ce8 100644 --- a/cc/draw_quad.h +++ b/cc/draw_quad.h @@ -5,6 +5,7 @@ #ifndef CCDrawQuad_h #define CCDrawQuad_h +#include "cc/cc_export.h" #include "cc/shared_quad_state.h" namespace cc { @@ -23,7 +24,7 @@ namespace cc { // materials need different bits of per-quad data to render, classes that derive // from DrawQuad store additional data in their derived instance. The Material // enum is used to "safely" downcast to the derived class. -class DrawQuad { +class CC_EXPORT DrawQuad { public: enum Material { Invalid, diff --git a/cc/font_atlas.h b/cc/font_atlas.h index 0a227a6..0656a98 100644 --- a/cc/font_atlas.h +++ b/cc/font_atlas.h @@ -9,6 +9,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/rect.h" @@ -22,7 +23,7 @@ class Size; namespace cc { // This class provides basic ability to draw text onto the heads-up display. -class FontAtlas { +class CC_EXPORT FontAtlas { public: static scoped_ptr<FontAtlas> create(SkBitmap bitmap, gfx::Rect asciiToRectTable[128], int fontHeight) { diff --git a/cc/frame_rate_controller.h b/cc/frame_rate_controller.h index 231ddda..41ccfd8 100644 --- a/cc/frame_rate_controller.h +++ b/cc/frame_rate_controller.h @@ -9,13 +9,14 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/time.h" +#include "cc/cc_export.h" namespace cc { class Thread; class TimeSource; -class FrameRateControllerClient { +class CC_EXPORT FrameRateControllerClient { public: // Throttled is true when we have a maximum number of frames pending. virtual void vsyncTick(bool throttled) = 0; @@ -26,7 +27,7 @@ protected: class FrameRateControllerTimeSourceAdapter; -class FrameRateController { +class CC_EXPORT FrameRateController { public: explicit FrameRateController(scoped_refptr<TimeSource>); // Alternate form of FrameRateController with unthrottled frame-rate. diff --git a/cc/gl_renderer.h b/cc/gl_renderer.h index 7d39f18..e21009d 100644 --- a/cc/gl_renderer.h +++ b/cc/gl_renderer.h @@ -5,6 +5,7 @@ #ifndef CCRendererGL_h #define CCRendererGL_h +#include "cc/cc_export.h" #include "cc/checkerboard_draw_quad.h" #include "cc/debug_border_draw_quad.h" #include "cc/direct_renderer.h" @@ -29,10 +30,10 @@ class GeometryBinding; class ScopedEnsureFramebufferAllocation; // Class that handles drawing of composited render layers using GL. -class GLRenderer : public DirectRenderer, - public WebKit::WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM, - public WebKit::WebGraphicsContext3D::WebGraphicsMemoryAllocationChangedCallbackCHROMIUM , - public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { +class CC_EXPORT GLRenderer : public DirectRenderer, + public NON_EXPORTED_BASE(WebKit::WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM), + public NON_EXPORTED_BASE(WebKit::WebGraphicsContext3D::WebGraphicsMemoryAllocationChangedCallbackCHROMIUM), + public NON_EXPORTED_BASE(WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback) { public: static scoped_ptr<GLRenderer> create(RendererClient*, ResourceProvider*); diff --git a/cc/heads_up_display_layer_impl.h b/cc/heads_up_display_layer_impl.h index b17644a..adcd789 100644 --- a/cc/heads_up_display_layer_impl.h +++ b/cc/heads_up_display_layer_impl.h @@ -6,6 +6,7 @@ #define CCHeadsUpDisplayLayerImpl_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/font_atlas.h" #include "cc/layer_impl.h" #include "cc/scoped_texture.h" @@ -18,7 +19,7 @@ class DebugRectHistory; class FontAtlas; class FrameRateCounter; -class HeadsUpDisplayLayerImpl : public LayerImpl { +class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl { public: static scoped_ptr<HeadsUpDisplayLayerImpl> create(int id) { diff --git a/cc/image_layer.h b/cc/image_layer.h index 3d66f13..9fdce93 100644 --- a/cc/image_layer.h +++ b/cc/image_layer.h @@ -5,6 +5,7 @@ #ifndef ImageLayerChromium_h #define ImageLayerChromium_h +#include "cc/cc_export.h" #include "cc/content_layer.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -13,7 +14,7 @@ namespace cc { class ImageLayerUpdater; // A Layer that contains only an Image element. -class ImageLayer : public TiledLayer { +class CC_EXPORT ImageLayer : public TiledLayer { public: static scoped_refptr<ImageLayer> create(); diff --git a/cc/input_handler.h b/cc/input_handler.h index 0e27bad..f5b2e23 100644 --- a/cc/input_handler.h +++ b/cc/input_handler.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "base/time.h" +#include "cc/cc_export.h" namespace gfx { class Point; @@ -25,7 +26,7 @@ class IntSize; // // The InputHandler is constructed with a InputHandlerClient, which is the // interface by which the handler can manipulate the LayerTree. -class InputHandlerClient { +class CC_EXPORT InputHandlerClient { public: enum ScrollStatus { ScrollOnMainThread, ScrollStarted, ScrollIgnored }; enum ScrollInputType { Gesture, Wheel }; @@ -71,7 +72,7 @@ private: DISALLOW_COPY_AND_ASSIGN(InputHandlerClient); }; -class InputHandler { +class CC_EXPORT InputHandler { public: virtual ~InputHandler() { } diff --git a/cc/io_surface_draw_quad.h b/cc/io_surface_draw_quad.h index 02d3086..c84cc1e 100644 --- a/cc/io_surface_draw_quad.h +++ b/cc/io_surface_draw_quad.h @@ -6,6 +6,7 @@ #define CCIOSurfaceDrawQuad_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/draw_quad.h" #include "ui/gfx/size.h" @@ -13,7 +14,7 @@ namespace cc { #pragma pack(push, 4) -class IOSurfaceDrawQuad : public DrawQuad { +class CC_EXPORT IOSurfaceDrawQuad : public DrawQuad { public: enum Orientation { Flipped, diff --git a/cc/io_surface_layer.h b/cc/io_surface_layer.h index 8045b85..7dfc15c 100644 --- a/cc/io_surface_layer.h +++ b/cc/io_surface_layer.h @@ -5,11 +5,12 @@ #ifndef IOSurfaceLayerChromium_h #define IOSurfaceLayerChromium_h +#include "cc/cc_export.h" #include "cc/layer.h" namespace cc { -class IOSurfaceLayer : public Layer { +class CC_EXPORT IOSurfaceLayer : public Layer { public: static scoped_refptr<IOSurfaceLayer> create(); diff --git a/cc/io_surface_layer_impl.h b/cc/io_surface_layer_impl.h index 91e889e..01fe628 100644 --- a/cc/io_surface_layer_impl.h +++ b/cc/io_surface_layer_impl.h @@ -5,12 +5,13 @@ #ifndef CCIOSurfaceLayerImpl_h #define CCIOSurfaceLayerImpl_h +#include "cc/cc_export.h" #include "cc/layer_impl.h" #include "ui/gfx/size.h" namespace cc { -class IOSurfaceLayerImpl : public LayerImpl { +class CC_EXPORT IOSurfaceLayerImpl : public LayerImpl { public: static scoped_ptr<IOSurfaceLayerImpl> create(int id) { diff --git a/cc/keyframed_animation_curve.h b/cc/keyframed_animation_curve.h index 7583f32..0cb2eb2 100644 --- a/cc/keyframed_animation_curve.h +++ b/cc/keyframed_animation_curve.h @@ -6,13 +6,14 @@ #define CCKeyframedAnimationCurve_h #include "cc/animation_curve.h" +#include "cc/cc_export.h" #include "cc/scoped_ptr_vector.h" #include "cc/timing_function.h" #include <public/WebTransformOperations.h> namespace cc { -class Keyframe { +class CC_EXPORT Keyframe { public: double time() const; const TimingFunction* timingFunction() const; @@ -24,9 +25,11 @@ protected: private: double m_time; scoped_ptr<TimingFunction> m_timingFunction; + + DISALLOW_COPY_AND_ASSIGN(Keyframe); }; -class FloatKeyframe : public Keyframe { +class CC_EXPORT FloatKeyframe : public Keyframe { public: static scoped_ptr<FloatKeyframe> create(double time, float value, scoped_ptr<TimingFunction>); virtual ~FloatKeyframe(); @@ -41,7 +44,7 @@ private: float m_value; }; -class TransformKeyframe : public Keyframe { +class CC_EXPORT TransformKeyframe : public Keyframe { public: static scoped_ptr<TransformKeyframe> create(double time, const WebKit::WebTransformOperations& value, scoped_ptr<TimingFunction>); virtual ~TransformKeyframe(); @@ -56,7 +59,7 @@ private: WebKit::WebTransformOperations m_value; }; -class KeyframedFloatAnimationCurve : public FloatAnimationCurve { +class CC_EXPORT KeyframedFloatAnimationCurve : public FloatAnimationCurve { public: // It is required that the keyframes be sorted by time. static scoped_ptr<KeyframedFloatAnimationCurve> create(); @@ -78,9 +81,11 @@ private: // Always sorted in order of increasing time. No two keyframes have the // same time. ScopedPtrVector<FloatKeyframe> m_keyframes; + + DISALLOW_COPY_AND_ASSIGN(KeyframedFloatAnimationCurve); }; -class KeyframedTransformAnimationCurve : public TransformAnimationCurve { +class CC_EXPORT KeyframedTransformAnimationCurve : public TransformAnimationCurve { public: // It is required that the keyframes be sorted by time. static scoped_ptr<KeyframedTransformAnimationCurve> create(); @@ -102,6 +107,8 @@ private: // Always sorted in order of increasing time. No two keyframes have the // same time. ScopedPtrVector<TransformKeyframe> m_keyframes; + + DISALLOW_COPY_AND_ASSIGN(KeyframedTransformAnimationCurve); }; } // namespace cc @@ -7,6 +7,7 @@ #include "Region.h" #include "base/memory/ref_counted.h" +#include "cc/cc_export.h" #include "cc/layer_animation_controller.h" #include "cc/occlusion_tracker.h" #include "cc/render_surface.h" @@ -40,7 +41,7 @@ struct RenderingStats; // Base class for composited layers. Special layer types are derived from // this class. -class Layer : public base::RefCounted<Layer>, public LayerAnimationControllerClient { +class CC_EXPORT Layer : public base::RefCounted<Layer>, public LayerAnimationControllerClient { public: typedef std::vector<scoped_refptr<Layer> > LayerList; diff --git a/cc/layer_animation_controller.h b/cc/layer_animation_controller.h index b3c08e8..285f00a 100644 --- a/cc/layer_animation_controller.h +++ b/cc/layer_animation_controller.h @@ -5,11 +5,11 @@ #ifndef CCLayerAnimationController_h #define CCLayerAnimationController_h -#include "cc/animation_events.h" - #include "base/basictypes.h" #include "base/hash_tables.h" #include "base/memory/scoped_ptr.h" +#include "cc/animation_events.h" +#include "cc/cc_export.h" #include "cc/scoped_ptr_vector.h" namespace WebKit { @@ -21,7 +21,7 @@ namespace cc { class Animation; class KeyframeValueList; -class LayerAnimationControllerClient { +class CC_EXPORT LayerAnimationControllerClient { public: virtual ~LayerAnimationControllerClient() { } @@ -32,7 +32,7 @@ public: virtual const WebKit::WebTransformationMatrix& transform() const = 0; }; -class LayerAnimationController { +class CC_EXPORT LayerAnimationController { public: static scoped_ptr<LayerAnimationController> create(LayerAnimationControllerClient*); diff --git a/cc/layer_impl.h b/cc/layer_impl.h index f9d50ce..7f5d5dd 100644 --- a/cc/layer_impl.h +++ b/cc/layer_impl.h @@ -5,10 +5,13 @@ #ifndef CCLayerImpl_h #define CCLayerImpl_h +#include <string> + #include "FloatSize.h" #include "Region.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/input_handler.h" #include "cc/layer_animation_controller.h" #include "cc/render_pass.h" @@ -21,7 +24,6 @@ #include "ui/gfx/rect_f.h" #include <public/WebFilterOperations.h> #include <public/WebTransformationMatrix.h> -#include <string> namespace cc { @@ -35,7 +37,7 @@ class Layer; struct AppendQuadsData; -class LayerImpl : public LayerAnimationControllerClient { +class CC_EXPORT LayerImpl : public LayerAnimationControllerClient { public: static scoped_ptr<LayerImpl> create(int id) { @@ -407,6 +409,8 @@ private: // Manages scrollbars for this layer scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController; + + DISALLOW_COPY_AND_ASSIGN(LayerImpl); }; void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*>::iterator end, LayerSorter*); diff --git a/cc/layer_iterator.cc b/cc/layer_iterator.cc index bb892ad..aadb281 100644 --- a/cc/layer_iterator.cc +++ b/cc/layer_iterator.cc @@ -128,22 +128,22 @@ typedef std::vector<scoped_refptr<Layer> > LayerList; typedef std::vector<LayerImpl*> LayerImplList; // Declare each of the above functions for Layer and LayerImpl classes so that they are linked. -template void LayerIteratorActions::BackToFront::begin(LayerIterator<Layer, LayerList, RenderSurface, BackToFront> &); -template void LayerIteratorActions::BackToFront::end(LayerIterator<Layer, LayerList, RenderSurface, BackToFront>&); -template void LayerIteratorActions::BackToFront::next(LayerIterator<Layer, LayerList, RenderSurface, BackToFront>&); - -template void LayerIteratorActions::BackToFront::begin(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, BackToFront>&); -template void LayerIteratorActions::BackToFront::end(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, BackToFront>&); -template void LayerIteratorActions::BackToFront::next(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, BackToFront>&); - -template void LayerIteratorActions::FrontToBack::next(LayerIterator<Layer, LayerList, RenderSurface, FrontToBack>&); -template void LayerIteratorActions::FrontToBack::end(LayerIterator<Layer, LayerList, RenderSurface, FrontToBack>&); -template void LayerIteratorActions::FrontToBack::begin(LayerIterator<Layer, LayerList, RenderSurface, FrontToBack>&); -template void LayerIteratorActions::FrontToBack::goToHighestInSubtree(LayerIterator<Layer, LayerList, RenderSurface, FrontToBack>&); - -template void LayerIteratorActions::FrontToBack::next(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>&); -template void LayerIteratorActions::FrontToBack::end(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>&); -template void LayerIteratorActions::FrontToBack::begin(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>&); -template void LayerIteratorActions::FrontToBack::goToHighestInSubtree(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>&); +template CC_EXPORT void LayerIteratorActions::BackToFront::begin(LayerIterator<Layer, LayerList, RenderSurface, BackToFront> &); +template CC_EXPORT void LayerIteratorActions::BackToFront::end(LayerIterator<Layer, LayerList, RenderSurface, BackToFront>&); +template CC_EXPORT void LayerIteratorActions::BackToFront::next(LayerIterator<Layer, LayerList, RenderSurface, BackToFront>&); + +template CC_EXPORT void LayerIteratorActions::BackToFront::begin(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, BackToFront>&); +template CC_EXPORT void LayerIteratorActions::BackToFront::end(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, BackToFront>&); +template CC_EXPORT void LayerIteratorActions::BackToFront::next(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, BackToFront>&); + +template CC_EXPORT void LayerIteratorActions::FrontToBack::next(LayerIterator<Layer, LayerList, RenderSurface, FrontToBack>&); +template CC_EXPORT void LayerIteratorActions::FrontToBack::end(LayerIterator<Layer, LayerList, RenderSurface, FrontToBack>&); +template CC_EXPORT void LayerIteratorActions::FrontToBack::begin(LayerIterator<Layer, LayerList, RenderSurface, FrontToBack>&); +template CC_EXPORT void LayerIteratorActions::FrontToBack::goToHighestInSubtree(LayerIterator<Layer, LayerList, RenderSurface, FrontToBack>&); + +template CC_EXPORT void LayerIteratorActions::FrontToBack::next(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>&); +template CC_EXPORT void LayerIteratorActions::FrontToBack::end(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>&); +template CC_EXPORT void LayerIteratorActions::FrontToBack::begin(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>&); +template CC_EXPORT void LayerIteratorActions::FrontToBack::goToHighestInSubtree(LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>&); } // namespace cc diff --git a/cc/layer_iterator.h b/cc/layer_iterator.h index eeaafb5..84814fc 100644 --- a/cc/layer_iterator.h +++ b/cc/layer_iterator.h @@ -5,9 +5,9 @@ #ifndef CCLayerIterator_h #define CCLayerIterator_h -#include "cc/layer_tree_host_common.h" - #include "base/memory/ref_counted.h" +#include "cc/cc_export.h" +#include "cc/layer_tree_host_common.h" namespace cc { @@ -168,9 +168,9 @@ private: }; // Orderings for iterating over the RenderSurfaceImpl-Layer tree. -struct LayerIteratorActions { +struct CC_EXPORT LayerIteratorActions { // Walks layers sorted by z-order from back to front. - class BackToFront { + class CC_EXPORT BackToFront { public: template <typename LayerType, typename LayerList, typename RenderSurfaceType, typename ActionType> void begin(LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>&); @@ -186,7 +186,7 @@ struct LayerIteratorActions { }; // Walks layers sorted by z-order from front to back - class FrontToBack { + class CC_EXPORT FrontToBack { public: template <typename LayerType, typename LayerList, typename RenderSurfaceType, typename ActionType> void begin(LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>&); diff --git a/cc/layer_painter.h b/cc/layer_painter.h index 81b0e44..2d695a6 100644 --- a/cc/layer_painter.h +++ b/cc/layer_painter.h @@ -6,6 +6,8 @@ #ifndef LayerPainterChromium_h #define LayerPainterChromium_h +#include "cc/cc_export.h" + class SkCanvas; namespace gfx { @@ -15,7 +17,7 @@ class RectF; namespace cc { -class LayerPainter { +class CC_EXPORT LayerPainter { public: virtual ~LayerPainter() { } virtual void paint(SkCanvas*, const gfx::Rect& contentRect, gfx::RectF& opaque) = 0; diff --git a/cc/layer_quad.h b/cc/layer_quad.h index 4de7bd8..e9ab5ec 100644 --- a/cc/layer_quad.h +++ b/cc/layer_quad.h @@ -6,6 +6,7 @@ #ifndef CCLayerQuad_h #define CCLayerQuad_h +#include "cc/cc_export.h" #include "ui/gfx/point_f.h" namespace gfx { @@ -16,7 +17,7 @@ static const float kAntiAliasingInflateDistance = 0.5f; namespace cc { -class LayerQuad { +class CC_EXPORT LayerQuad { public: class Edge { public: diff --git a/cc/layer_sorter.h b/cc/layer_sorter.h index a129d66..56cd8ac 100644 --- a/cc/layer_sorter.h +++ b/cc/layer_sorter.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "base/hash_tables.h" +#include "cc/cc_export.h" #include "cc/layer_impl.h" #include "ui/gfx/point3_f.h" #include "ui/gfx/quad_f.h" @@ -38,7 +39,7 @@ namespace cc { struct GraphEdge; // Holds various useful properties derived from a layer's 3D outline. -struct LayerShape { +struct CC_EXPORT LayerShape { LayerShape(); LayerShape(float width, float height, const WebKit::WebTransformationMatrix& drawTransform); ~LayerShape(); @@ -77,7 +78,7 @@ struct GraphEdge { -class LayerSorter { +class CC_EXPORT LayerSorter { public: LayerSorter(); ~LayerSorter(); diff --git a/cc/layer_tiling_data.h b/cc/layer_tiling_data.h index 5f2e5ea..97fdbb0 100644 --- a/cc/layer_tiling_data.h +++ b/cc/layer_tiling_data.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/hash_pair.h" #include "cc/scoped_ptr_hash_map.h" #include "cc/tiling_data.h" @@ -16,7 +17,7 @@ namespace cc { -class LayerTilingData { +class CC_EXPORT LayerTilingData { public: enum BorderTexelOption { HasBorderTexels, NoBorderTexels }; diff --git a/cc/layer_tree_host.h b/cc/layer_tree_host.h index 72a174b..d36390b 100644 --- a/cc/layer_tree_host.h +++ b/cc/layer_tree_host.h @@ -14,6 +14,7 @@ #include "base/memory/scoped_ptr.h" #include "base/time.h" #include "cc/animation_events.h" +#include "cc/cc_export.h" #include "cc/graphics_context.h" #include "cc/layer_tree_host_client.h" #include "cc/layer_tree_host_common.h" @@ -49,7 +50,7 @@ class HeadsUpDisplayLayer; class Region; struct ScrollAndScaleSet; -struct LayerTreeSettings { +struct CC_EXPORT LayerTreeSettings { LayerTreeSettings(); ~LayerTreeSettings(); @@ -90,7 +91,7 @@ struct RendererCapabilities { int maxTextureSize; }; -class LayerTreeHost : public RateLimiterClient { +class CC_EXPORT LayerTreeHost : public RateLimiterClient { public: static scoped_ptr<LayerTreeHost> create(LayerTreeHostClient*, const LayerTreeSettings&); virtual ~LayerTreeHost(); diff --git a/cc/layer_tree_host_common.h b/cc/layer_tree_host_common.h index c530c55..d936019 100644 --- a/cc/layer_tree_host_common.h +++ b/cc/layer_tree_host_common.h @@ -6,6 +6,7 @@ #define CCLayerTreeHostCommon_h #include "base/memory/ref_counted.h" +#include "cc/cc_export.h" #include "cc/scoped_ptr_vector.h" #include "ui/gfx/rect.h" #include "IntSize.h" @@ -17,7 +18,7 @@ class LayerImpl; class LayerSorter; class Layer; -class LayerTreeHostCommon { +class CC_EXPORT LayerTreeHostCommon { public: static gfx::Rect calculateVisibleRect(const gfx::Rect& targetSurfaceRect, const gfx::Rect& layerBoundRect, const WebKit::WebTransformationMatrix&); @@ -49,7 +50,7 @@ public: }; }; -struct ScrollAndScaleSet { +struct CC_EXPORT ScrollAndScaleSet { ScrollAndScaleSet(); ~ScrollAndScaleSet(); diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc index a01f821..73568ff 100644 --- a/cc/layer_tree_host_impl.cc +++ b/cc/layer_tree_host_impl.cc @@ -579,8 +579,8 @@ bool LayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass(cons } // Defined for linking tests. -template void LayerTreeHostImpl::removeRenderPasses<LayerTreeHostImpl::CullRenderPassesWithCachedTextures>(CullRenderPassesWithCachedTextures, FrameData&); -template void LayerTreeHostImpl::removeRenderPasses<LayerTreeHostImpl::CullRenderPassesWithNoQuads>(CullRenderPassesWithNoQuads, FrameData&); +template CC_EXPORT void LayerTreeHostImpl::removeRenderPasses<LayerTreeHostImpl::CullRenderPassesWithCachedTextures>(CullRenderPassesWithCachedTextures, FrameData&); +template CC_EXPORT void LayerTreeHostImpl::removeRenderPasses<LayerTreeHostImpl::CullRenderPassesWithNoQuads>(CullRenderPassesWithNoQuads, FrameData&); // static template<typename RenderPassCuller> diff --git a/cc/layer_tree_host_impl.h b/cc/layer_tree_host_impl.h index 2d4f175..93bb9b5 100644 --- a/cc/layer_tree_host_impl.h +++ b/cc/layer_tree_host_impl.h @@ -10,6 +10,7 @@ #include "base/memory/scoped_ptr.h" #include "base/time.h" #include "cc/animation_events.h" +#include "cc/cc_export.h" #include "cc/input_handler.h" #include "cc/layer_sorter.h" #include "cc/render_pass.h" @@ -100,9 +101,9 @@ private: }; // LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering state -class LayerTreeHostImpl : public InputHandlerClient, - public RendererClient, - public WebKit::WebCompositorOutputSurfaceClient { +class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient, + public RendererClient, + public NON_EXPORTED_BASE(WebKit::WebCompositorOutputSurfaceClient) { typedef std::vector<LayerImpl*> LayerList; public: @@ -119,7 +120,7 @@ public: virtual void startPageScaleAnimation(const IntSize& targetPosition, bool anchorPoint, float pageScale, base::TimeTicks startTime, base::TimeDelta duration) OVERRIDE; virtual void scheduleAnimation() OVERRIDE; - struct FrameData : public RenderPassSink { + struct CC_EXPORT FrameData : public RenderPassSink { FrameData(); ~FrameData(); @@ -233,7 +234,7 @@ public: DebugRectHistory* debugRectHistory() const { return m_debugRectHistory.get(); } ResourceProvider* resourceProvider() const { return m_resourceProvider.get(); } - class CullRenderPassesWithCachedTextures { + class CC_EXPORT CullRenderPassesWithCachedTextures { public: bool shouldRemoveRenderPass(const RenderPassDrawQuad&, const FrameData&) const; @@ -249,7 +250,7 @@ public: Renderer& m_renderer; }; - class CullRenderPassesWithNoQuads { + class CC_EXPORT CullRenderPassesWithNoQuads { public: bool shouldRemoveRenderPass(const RenderPassDrawQuad&, const FrameData&) const; diff --git a/cc/layer_updater.h b/cc/layer_updater.h index bb04a1d..d490ac4 100644 --- a/cc/layer_updater.h +++ b/cc/layer_updater.h @@ -6,6 +6,7 @@ #define LayerUpdater_h #include "base/memory/ref_counted.h" +#include "cc/cc_export.h" #include "cc/prioritized_texture.h" #include "third_party/khronos/GLES2/gl2.h" @@ -20,10 +21,10 @@ class TextureManager; struct RenderingStats; class ResourceUpdateQueue; -class LayerUpdater : public base::RefCounted<LayerUpdater> { +class CC_EXPORT LayerUpdater : public base::RefCounted<LayerUpdater> { public: // Allows updaters to store per-resource update properties. - class Resource { + class CC_EXPORT Resource { public: virtual ~Resource(); diff --git a/cc/managed_memory_policy.h b/cc/managed_memory_policy.h index eba13c3..c4e54d1 100644 --- a/cc/managed_memory_policy.h +++ b/cc/managed_memory_policy.h @@ -6,10 +6,11 @@ #define managed_memory_policy_h #include "base/basictypes.h" +#include "cc/cc_export.h" namespace cc { -struct ManagedMemoryPolicy { +struct CC_EXPORT ManagedMemoryPolicy { ManagedMemoryPolicy(size_t bytesLimitWhenVisible); ManagedMemoryPolicy(size_t bytesLimitWhenVisible, int priorityCutoffWhenVisible, diff --git a/cc/math_util.h b/cc/math_util.h index dae4efb..f2cba22 100644 --- a/cc/math_util.h +++ b/cc/math_util.h @@ -6,6 +6,7 @@ #define CCMathUtil_h #include "base/logging.h" +#include "cc/cc_export.h" #include "ui/gfx/point_f.h" #include "ui/gfx/point3_f.h" @@ -65,7 +66,7 @@ struct HomogeneousCoordinate { double w; }; -class MathUtil { +class CC_EXPORT MathUtil { public: // Background: WebTransformationMatrix code in WebCore does not do the right thing in diff --git a/cc/occlusion_tracker.cc b/cc/occlusion_tracker.cc index 1523362..fc6e733 100644 --- a/cc/occlusion_tracker.cc +++ b/cc/occlusion_tracker.cc @@ -30,6 +30,11 @@ OcclusionTrackerBase<LayerType, RenderSurfaceType>::OcclusionTrackerBase(gfx::Re } template<typename LayerType, typename RenderSurfaceType> +OcclusionTrackerBase<LayerType, RenderSurfaceType>::~OcclusionTrackerBase() +{ +} + +template<typename LayerType, typename RenderSurfaceType> void OcclusionTrackerBase<LayerType, RenderSurfaceType>::enterLayer(const LayerIteratorPosition<LayerType>& layerIterator) { LayerType* renderTarget = layerIterator.targetRenderSurfaceLayer; @@ -459,30 +464,8 @@ gfx::Rect OcclusionTrackerBase<LayerType, RenderSurfaceType>::layerClipRectInTar return layer->drawableContentRect(); } -// Declare the possible functions here for the linker. -template OcclusionTrackerBase<Layer, RenderSurface>::OcclusionTrackerBase(gfx::Rect rootTargetRect, bool recordMetricsForFrame); -template void OcclusionTrackerBase<Layer, RenderSurface>::enterLayer(const LayerIteratorPosition<Layer>&); -template void OcclusionTrackerBase<Layer, RenderSurface>::leaveLayer(const LayerIteratorPosition<Layer>&); -template void OcclusionTrackerBase<Layer, RenderSurface>::enterRenderTarget(const Layer* newTarget); -template void OcclusionTrackerBase<Layer, RenderSurface>::finishedRenderTarget(const Layer* finishedTarget); -template void OcclusionTrackerBase<Layer, RenderSurface>::leaveToRenderTarget(const Layer* newTarget); -template void OcclusionTrackerBase<Layer, RenderSurface>::markOccludedBehindLayer(const Layer*); -template bool OcclusionTrackerBase<Layer, RenderSurface>::occluded(const Layer*, const gfx::Rect& contentRect, const WebKit::WebTransformationMatrix& drawTransform, bool implDrawTransformIsUnknown, const gfx::Rect& clippedRectInTarget, bool* hasOcclusionFromOutsideTargetSurface) const; -template gfx::Rect OcclusionTrackerBase<Layer, RenderSurface>::unoccludedContentRect(const Layer*, const gfx::Rect& contentRect, const WebKit::WebTransformationMatrix& drawTransform, bool implDrawTransformIsUnknown, const gfx::Rect& clippedRectInTarget, bool* hasOcclusionFromOutsideTargetSurface) const; -template gfx::Rect OcclusionTrackerBase<Layer, RenderSurface>::unoccludedContributingSurfaceContentRect(const Layer*, bool forReplica, const gfx::Rect& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const; -template gfx::Rect OcclusionTrackerBase<Layer, RenderSurface>::layerClipRectInTarget(const Layer*) const; - -template OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::OcclusionTrackerBase(gfx::Rect rootTargetRect, bool recordMetricsForFrame); -template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::enterLayer(const LayerIteratorPosition<LayerImpl>&); -template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::leaveLayer(const LayerIteratorPosition<LayerImpl>&); -template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::enterRenderTarget(const LayerImpl* newTarget); -template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::finishedRenderTarget(const LayerImpl* finishedTarget); -template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::leaveToRenderTarget(const LayerImpl* newTarget); -template void OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::markOccludedBehindLayer(const LayerImpl*); -template bool OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::occluded(const LayerImpl*, const gfx::Rect& contentRect, const WebKit::WebTransformationMatrix& drawTransform, bool implDrawTransformIsUnknown, const gfx::Rect& clippedRectInTarget, bool* hasOcclusionFromOutsideTargetSurface) const; -template gfx::Rect OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::unoccludedContentRect(const LayerImpl*, const gfx::Rect& contentRect, const WebKit::WebTransformationMatrix& drawTransform, bool implDrawTransformIsUnknown, const gfx::Rect& clippedRectInTarget, bool* hasOcclusionFromOutsideTargetSurface) const; -template gfx::Rect OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::unoccludedContributingSurfaceContentRect(const LayerImpl*, bool forReplica, const gfx::Rect& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const; -template gfx::Rect OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::layerClipRectInTarget(const LayerImpl*) const; - +// Instantiate (and export) templates here for the linker. +template class CC_EXPORT OcclusionTrackerBase<Layer, RenderSurface>; +template class CC_EXPORT OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>; } // namespace cc diff --git a/cc/occlusion_tracker.h b/cc/occlusion_tracker.h index 0bb6dc0..7731a07 100644 --- a/cc/occlusion_tracker.h +++ b/cc/occlusion_tracker.h @@ -7,6 +7,7 @@ #include "Region.h" #include "base/basictypes.h" +#include "cc/cc_export.h" #include "cc/layer_iterator.h" #include "ui/gfx/rect.h" @@ -23,9 +24,10 @@ class RenderSurface; // If the current layer owns a RenderSurfaceImpl, then occlusion on that RenderSurfaceImpl may also be queried via surfaceOccluded() and surfaceUnoccludedContentRect(). // Finally, once finished with the layer, occlusion behind the layer should be marked by calling markOccludedBehindLayer(). template<typename LayerType, typename RenderSurfaceType> -class OcclusionTrackerBase { +class CC_EXPORT OcclusionTrackerBase { public: - OcclusionTrackerBase(gfx::Rect rootTargetRect, bool recordMetricsForFrame); + OcclusionTrackerBase(gfx::Rect rootTargetRect, bool recordMetricsForFrame); + ~OcclusionTrackerBase(); // Called at the beginning of each step in the LayerIterator's front-to-back traversal. void enterLayer(const LayerIteratorPosition<LayerType>&); diff --git a/cc/prioritized_texture.h b/cc/prioritized_texture.h index 4a1713d..f8c7240 100644 --- a/cc/prioritized_texture.h +++ b/cc/prioritized_texture.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/priority_calculator.h" #include "cc/resource_provider.h" #include "cc/texture.h" @@ -20,7 +21,7 @@ namespace cc { class PrioritizedTextureManager; -class PrioritizedTexture { +class CC_EXPORT PrioritizedTexture { public: static scoped_ptr<PrioritizedTexture> create(PrioritizedTextureManager* manager, gfx::Size size, GLenum format) { diff --git a/cc/prioritized_texture_manager.h b/cc/prioritized_texture_manager.h index 92d739f..e358fcb 100644 --- a/cc/prioritized_texture_manager.h +++ b/cc/prioritized_texture_manager.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/hash_tables.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/prioritized_texture.h" #include "cc/priority_calculator.h" #include "cc/texture.h" @@ -32,7 +33,7 @@ namespace cc { class PriorityCalculator; -class PrioritizedTextureManager { +class CC_EXPORT PrioritizedTextureManager { public: static scoped_ptr<PrioritizedTextureManager> create(size_t maxMemoryLimitBytes, int maxTextureSize, int pool) { diff --git a/cc/priority_calculator.h b/cc/priority_calculator.h index 2b39fdc..7cb4b93 100644 --- a/cc/priority_calculator.h +++ b/cc/priority_calculator.h @@ -5,13 +5,15 @@ #ifndef CCPriorityCalculator_h #define CCPriorityCalculator_h +#include "cc/cc_export.h" + namespace gfx { class Rect; } namespace cc { -class PriorityCalculator { +class CC_EXPORT PriorityCalculator { public: static int uiPriority(bool drawsToRootSurface); static int visiblePriority(bool drawsToRootSurface); @@ -9,6 +9,7 @@ #include "base/logging.h" #include "base/time.h" #include <public/WebCompositorOutputSurface.h> +#include "cc/cc_export.h" namespace gfx { class Rect; @@ -23,7 +24,7 @@ struct RendererCapabilities; // Abstract class responsible for proxying commands from the main-thread side of // the compositor over to the compositor implementation. -class Proxy { +class CC_EXPORT Proxy { public: static void setMainThread(Thread*); static Thread* mainThread(); diff --git a/cc/quad_culler.h b/cc/quad_culler.h index 916ab13..33cfc2f 100644 --- a/cc/quad_culler.h +++ b/cc/quad_culler.h @@ -5,6 +5,7 @@ #ifndef CCQuadCuller_h #define CCQuadCuller_h +#include "cc/cc_export.h" #include "cc/quad_sink.h" #include "cc/render_pass.h" @@ -14,7 +15,7 @@ class RenderSurfaceImpl; template<typename LayerType, typename SurfaceType> class OcclusionTrackerBase; -class QuadCuller : public QuadSink { +class CC_EXPORT QuadCuller : public QuadSink { public: QuadCuller(QuadList&, SharedQuadStateList&, LayerImpl*, const OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>*, bool showCullingWithDebugBorderQuads, bool forSurface); virtual ~QuadCuller() { } diff --git a/cc/quad_sink.h b/cc/quad_sink.h index e925756..e8bf580 100644 --- a/cc/quad_sink.h +++ b/cc/quad_sink.h @@ -6,6 +6,7 @@ #define CCQuadSink_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" namespace cc { @@ -14,7 +15,7 @@ class DrawQuad; struct AppendQuadsData; struct SharedQuadState; -class QuadSink { +class CC_EXPORT QuadSink { public: virtual ~QuadSink() { } diff --git a/cc/render_pass.h b/cc/render_pass.h index 6c09c7b..6b77f0e 100644 --- a/cc/render_pass.h +++ b/cc/render_pass.h @@ -6,6 +6,7 @@ #define CCRenderPass_h #include "base/basictypes.h" +#include "cc/cc_export.h" #include "cc/draw_quad.h" #include "cc/hash_pair.h" #include "cc/scoped_ptr_hash_map.h" @@ -44,7 +45,7 @@ public: typedef ScopedPtrVector<SharedQuadState> SharedQuadStateList; -class RenderPass { +class CC_EXPORT RenderPass { public: ~RenderPass(); diff --git a/cc/render_pass_draw_quad.h b/cc/render_pass_draw_quad.h index 5bb22ab..ce927e0 100644 --- a/cc/render_pass_draw_quad.h +++ b/cc/render_pass_draw_quad.h @@ -7,13 +7,14 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/draw_quad.h" #include "cc/render_pass.h" #include "cc/resource_provider.h" namespace cc { -class RenderPassDrawQuad : public DrawQuad { +class CC_EXPORT RenderPassDrawQuad : public DrawQuad { public: static scoped_ptr<RenderPassDrawQuad> create(const SharedQuadState*, const gfx::Rect&, RenderPass::Id renderPassId, bool isReplica, ResourceProvider::ResourceId maskResourceId, const gfx::Rect& contentsChangedSinceLastFrame, float maskTexCoordScaleX, float maskTexCoordScaleY, float maskTexCoordOffsetX, float maskTexCoordOffsetY); diff --git a/cc/render_pass_sink.h b/cc/render_pass_sink.h index efef7f2..10a34e7 100644 --- a/cc/render_pass_sink.h +++ b/cc/render_pass_sink.h @@ -6,12 +6,13 @@ #define CCRenderPassSink_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" namespace cc { class RenderPass; -class RenderPassSink { +class CC_EXPORT RenderPassSink { public: virtual void appendRenderPass(scoped_ptr<RenderPass>) = 0; }; diff --git a/cc/render_surface.h b/cc/render_surface.h index 02aa70a..6370063 100644 --- a/cc/render_surface.h +++ b/cc/render_surface.h @@ -12,12 +12,13 @@ #include "ui/gfx/rect_f.h" #include <public/WebTransformationMatrix.h> #include <vector> +#include "cc/cc_export.h" namespace cc { class Layer; -class RenderSurface { +class CC_EXPORT RenderSurface { public: explicit RenderSurface(Layer*); ~RenderSurface(); diff --git a/cc/render_surface_filters.h b/cc/render_surface_filters.h index ead04aa..601ebe6 100644 --- a/cc/render_surface_filters.h +++ b/cc/render_surface_filters.h @@ -6,6 +6,8 @@ #ifndef CCRenderSurfaceFilters_h #define CCRenderSurfaceFilters_h +#include "cc/cc_export.h" + class GrContext; class SkBitmap; @@ -20,7 +22,7 @@ class WebGraphicsContext3D; namespace cc { -class RenderSurfaceFilters { +class CC_EXPORT RenderSurfaceFilters { public: static SkBitmap apply(const WebKit::WebFilterOperations& filters, unsigned textureId, const gfx::SizeF&, WebKit::WebGraphicsContext3D*, GrContext*); static WebKit::WebFilterOperations optimize(const WebKit::WebFilterOperations& filters); diff --git a/cc/render_surface_impl.h b/cc/render_surface_impl.h index ec0fde9..654d6b8 100644 --- a/cc/render_surface_impl.h +++ b/cc/render_surface_impl.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/render_pass.h" #include "cc/shared_quad_state.h" #include "ui/gfx/rect.h" @@ -23,7 +24,7 @@ class LayerImpl; struct AppendQuadsData; -class RenderSurfaceImpl { +class CC_EXPORT RenderSurfaceImpl { public: explicit RenderSurfaceImpl(LayerImpl*); virtual ~RenderSurfaceImpl(); diff --git a/cc/renderer.h b/cc/renderer.h index 1b54a6a..17bc8d4 100644 --- a/cc/renderer.h +++ b/cc/renderer.h @@ -6,6 +6,7 @@ #define CCRenderer_h #include "base/basictypes.h" +#include "cc/cc_export.h" #include "cc/layer_tree_host.h" #include "cc/managed_memory_policy.h" #include "cc/render_pass.h" @@ -14,7 +15,7 @@ namespace cc { class ScopedTexture; -class RendererClient { +class CC_EXPORT RendererClient { public: virtual const gfx::Size& deviceViewportSize() const = 0; virtual const LayerTreeSettings& settings() const = 0; @@ -27,7 +28,7 @@ protected: virtual ~RendererClient() { } }; -class Renderer { +class CC_EXPORT Renderer { public: // This enum defines the various resource pools for the ResourceProvider // where textures get allocated. diff --git a/cc/resource_provider.h b/cc/resource_provider.h index b90524b..6262d31 100644 --- a/cc/resource_provider.h +++ b/cc/resource_provider.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/hash_tables.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/graphics_context.h" #include "cc/texture_copier.h" #include "third_party/khronos/GLES2/gl2.h" @@ -28,13 +29,11 @@ class Vector2d; namespace cc { -class LayerTextureSubImage; -class TextureCopier; class TextureUploader; // Thread-safety notes: this class is not thread-safe and can only be called // from the thread it was created on (in practice, the compositor thread). -class ResourceProvider { +class CC_EXPORT ResourceProvider { public: typedef unsigned ResourceId; typedef std::vector<ResourceId> ResourceIdArray; @@ -54,7 +53,7 @@ public: Mailbox mailbox; }; typedef std::vector<TransferableResource> TransferableResourceArray; - struct TransferableResourceList { + struct CC_EXPORT TransferableResourceList { TransferableResourceList(); ~TransferableResourceList(); @@ -154,7 +153,7 @@ public: // needed to read and write the resource contents. The user must ensure // that they only use GL locks on GL resources, etc, and this is enforced // by assertions. - class ScopedReadLockGL { + class CC_EXPORT ScopedReadLockGL { public: ScopedReadLockGL(ResourceProvider*, ResourceProvider::ResourceId); ~ScopedReadLockGL(); @@ -169,7 +168,7 @@ public: DISALLOW_COPY_AND_ASSIGN(ScopedReadLockGL); }; - class ScopedWriteLockGL { + class CC_EXPORT ScopedWriteLockGL { public: ScopedWriteLockGL(ResourceProvider*, ResourceProvider::ResourceId); ~ScopedWriteLockGL(); @@ -184,7 +183,7 @@ public: DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockGL); }; - class ScopedReadLockSoftware { + class CC_EXPORT ScopedReadLockSoftware { public: ScopedReadLockSoftware(ResourceProvider*, ResourceProvider::ResourceId); ~ScopedReadLockSoftware(); @@ -199,7 +198,7 @@ public: DISALLOW_COPY_AND_ASSIGN(ScopedReadLockSoftware); }; - class ScopedWriteLockSoftware { + class CC_EXPORT ScopedWriteLockSoftware { public: ScopedWriteLockSoftware(ResourceProvider*, ResourceProvider::ResourceId); ~ScopedWriteLockSoftware(); diff --git a/cc/resource_update.h b/cc/resource_update.h index 78f5fdf..94b7739 100644 --- a/cc/resource_update.h +++ b/cc/resource_update.h @@ -7,6 +7,7 @@ #include "ui/gfx/rect.h" #include "ui/gfx/vector2d.h" +#include "cc/cc_export.h" class SkBitmap; class SkPicture; @@ -15,7 +16,7 @@ namespace cc { class PrioritizedTexture; -struct ResourceUpdate { +struct CC_EXPORT ResourceUpdate { static ResourceUpdate Create(PrioritizedTexture*, const SkBitmap*, gfx::Rect content_rect, diff --git a/cc/resource_update_controller.h b/cc/resource_update_controller.h index 7405149..dae5ddc 100644 --- a/cc/resource_update_controller.h +++ b/cc/resource_update_controller.h @@ -9,6 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/time.h" +#include "cc/cc_export.h" #include "cc/resource_update_queue.h" namespace cc { @@ -24,7 +25,7 @@ protected: virtual ~ResourceUpdateControllerClient() { } }; -class ResourceUpdateController { +class CC_EXPORT ResourceUpdateController { public: static scoped_ptr<ResourceUpdateController> create(ResourceUpdateControllerClient* client, Thread* thread, scoped_ptr<ResourceUpdateQueue> queue, ResourceProvider* resourceProvider) { diff --git a/cc/resource_update_queue.h b/cc/resource_update_queue.h index a9c0fbc..4dbb154 100644 --- a/cc/resource_update_queue.h +++ b/cc/resource_update_queue.h @@ -6,13 +6,14 @@ #define CCResourceUpdateQueue_h #include "base/basictypes.h" +#include "cc/cc_export.h" #include "cc/resource_update.h" #include "cc/texture_copier.h" #include <deque> namespace cc { -class ResourceUpdateQueue { +class CC_EXPORT ResourceUpdateQueue { public: ResourceUpdateQueue(); virtual ~ResourceUpdateQueue(); diff --git a/cc/scheduler.h b/cc/scheduler.h index dbfa6c6..621d519 100644 --- a/cc/scheduler.h +++ b/cc/scheduler.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/time.h" +#include "cc/cc_export.h" #include "cc/frame_rate_controller.h" #include "cc/scheduler_state_machine.h" @@ -44,7 +45,7 @@ protected: virtual ~SchedulerClient() { } }; -class Scheduler : FrameRateControllerClient { +class CC_EXPORT Scheduler : FrameRateControllerClient { public: static scoped_ptr<Scheduler> create(SchedulerClient* client, scoped_ptr<FrameRateController> frameRateController) { diff --git a/cc/scheduler_state_machine.h b/cc/scheduler_state_machine.h index 782c084..ef338d2 100644 --- a/cc/scheduler_state_machine.h +++ b/cc/scheduler_state_machine.h @@ -8,6 +8,7 @@ #include <string> #include "base/basictypes.h" +#include "cc/cc_export.h" namespace cc { @@ -21,7 +22,7 @@ namespace cc { // // The scheduler seperates "what to do next" from the updating of its internal state to // make testing cleaner. -class SchedulerStateMachine { +class CC_EXPORT SchedulerStateMachine { public: SchedulerStateMachine(); diff --git a/cc/scoped_texture.h b/cc/scoped_texture.h index ef32261..8df1f9a 100644 --- a/cc/scoped_texture.h +++ b/cc/scoped_texture.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/texture.h" #ifndef NDEBUG @@ -16,7 +17,7 @@ namespace cc { -class ScopedTexture : protected Texture { +class CC_EXPORT ScopedTexture : protected Texture { public: static scoped_ptr<ScopedTexture> create(ResourceProvider* resourceProvider) { return make_scoped_ptr(new ScopedTexture(resourceProvider)); } virtual ~ScopedTexture(); diff --git a/cc/scoped_thread_proxy.h b/cc/scoped_thread_proxy.h index b48f276..56d53c7 100644 --- a/cc/scoped_thread_proxy.h +++ b/cc/scoped_thread_proxy.h @@ -7,6 +7,7 @@ #include "base/memory/ref_counted.h" #include "base/callback.h" +#include "cc/cc_export.h" #include "cc/thread.h" #include "base/location.h" #include "base/logging.h" @@ -23,7 +24,7 @@ namespace cc { // Implementation note: Unlike ScopedRunnableMethodFactory in Chromium, pending tasks are not cancelled by actually // destroying the proxy. Instead each pending task holds a reference to the proxy to avoid maintaining an explicit // list of outstanding tasks. -class ScopedThreadProxy : public base::RefCountedThreadSafe<ScopedThreadProxy> { +class CC_EXPORT ScopedThreadProxy : public base::RefCountedThreadSafe<ScopedThreadProxy> { public: static scoped_refptr<ScopedThreadProxy> create(cc::Thread* targetThread) { diff --git a/cc/scrollbar_animation_controller.h b/cc/scrollbar_animation_controller.h index bccd992..6b64f9b 100644 --- a/cc/scrollbar_animation_controller.h +++ b/cc/scrollbar_animation_controller.h @@ -6,6 +6,7 @@ #define CCScrollbarAnimationController_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "FloatPoint.h" #include "IntSize.h" @@ -20,7 +21,7 @@ class ScrollbarLayerImpl; // This abstract class represents the compositor-side analogy of ScrollbarAnimator. // Individual platforms should subclass it to provide specialized implementation. -class ScrollbarAnimationController { +class CC_EXPORT ScrollbarAnimationController { public: static scoped_ptr<ScrollbarAnimationController> create(LayerImpl* scrollLayer); diff --git a/cc/scrollbar_animation_controller_linear_fade.h b/cc/scrollbar_animation_controller_linear_fade.h index fa5c3d1..24cba76 100644 --- a/cc/scrollbar_animation_controller_linear_fade.h +++ b/cc/scrollbar_animation_controller_linear_fade.h @@ -5,11 +5,12 @@ #ifndef CCScrollbarAnimationControllerLinearFade_h #define CCScrollbarAnimationControllerLinearFade_h +#include "cc/cc_export.h" #include "cc/scrollbar_animation_controller.h" namespace cc { -class ScrollbarAnimationControllerLinearFade : public ScrollbarAnimationController { +class CC_EXPORT ScrollbarAnimationControllerLinearFade : public ScrollbarAnimationController { public: static scoped_ptr<ScrollbarAnimationControllerLinearFade> create(LayerImpl* scrollLayer, double fadeoutDelay, double fadeoutLength); diff --git a/cc/scrollbar_geometry_fixed_thumb.h b/cc/scrollbar_geometry_fixed_thumb.h index ecec1d8..5ddacc1 100644 --- a/cc/scrollbar_geometry_fixed_thumb.h +++ b/cc/scrollbar_geometry_fixed_thumb.h @@ -6,6 +6,7 @@ #define CCScrollbarGeometryFixedThumb_h #include "IntSize.h" +#include "cc/cc_export.h" #include "cc/scrollbar_geometry_stub.h" namespace cc { @@ -14,7 +15,7 @@ namespace cc { // it always returns a fixed thumb length. This allows a page to zoom (changing // the total size of the scrollable area, changing the thumb length) while not // requiring the thumb resource to be repainted. -class ScrollbarGeometryFixedThumb : public ScrollbarGeometryStub { +class CC_EXPORT ScrollbarGeometryFixedThumb : public ScrollbarGeometryStub { public: static scoped_ptr<ScrollbarGeometryFixedThumb> create(scoped_ptr<WebKit::WebScrollbarThemeGeometry>); virtual ~ScrollbarGeometryFixedThumb(); diff --git a/cc/scrollbar_geometry_stub.h b/cc/scrollbar_geometry_stub.h index ed47eef..163ae51 100644 --- a/cc/scrollbar_geometry_stub.h +++ b/cc/scrollbar_geometry_stub.h @@ -6,6 +6,7 @@ #define CCScrollbarGeometryStub_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include <public/WebScrollbarThemeGeometry.h> namespace cc { @@ -13,7 +14,7 @@ namespace cc { // This subclass wraps an existing scrollbar geometry class so that // another class can derive from it and override specific functions, while // passing through the remaining ones. -class ScrollbarGeometryStub : public WebKit::WebScrollbarThemeGeometry { +class CC_EXPORT ScrollbarGeometryStub : public NON_EXPORTED_BASE(WebKit::WebScrollbarThemeGeometry) { public: virtual ~ScrollbarGeometryStub(); @@ -44,6 +45,8 @@ protected: private: scoped_ptr<WebKit::WebScrollbarThemeGeometry> m_geometry; + + DISALLOW_COPY_AND_ASSIGN(ScrollbarGeometryStub); }; } diff --git a/cc/scrollbar_layer.h b/cc/scrollbar_layer.h index 6da0993..ab0da73 100644 --- a/cc/scrollbar_layer.h +++ b/cc/scrollbar_layer.h @@ -7,6 +7,7 @@ #define ScrollbarLayerChromium_h #include "cc/caching_bitmap_content_layer_updater.h" +#include "cc/cc_export.h" #include "cc/contents_scaling_layer.h" #include <public/WebScrollbar.h> #include <public/WebScrollbarThemeGeometry.h> @@ -18,7 +19,7 @@ class ResourceUpdateQueue; class Scrollbar; class ScrollbarThemeComposite; -class ScrollbarLayer : public ContentsScalingLayer { +class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer { public: virtual scoped_ptr<LayerImpl> createLayerImpl() OVERRIDE; diff --git a/cc/scrollbar_layer_impl.h b/cc/scrollbar_layer_impl.h index db7ba16..ab197dc 100644 --- a/cc/scrollbar_layer_impl.h +++ b/cc/scrollbar_layer_impl.h @@ -5,6 +5,7 @@ #ifndef CCScrollbarLayerImpl_h #define CCScrollbarLayerImpl_h +#include "cc/cc_export.h" #include "cc/layer_impl.h" #include "cc/scrollbar_geometry_fixed_thumb.h" #include <public/WebRect.h> @@ -15,7 +16,7 @@ namespace cc { class ScrollView; -class ScrollbarLayerImpl : public LayerImpl { +class CC_EXPORT ScrollbarLayerImpl : public LayerImpl { public: static scoped_ptr<ScrollbarLayerImpl> create(int id); virtual ~ScrollbarLayerImpl(); diff --git a/cc/settings.h b/cc/settings.h index a25434d..21b240b 100644 --- a/cc/settings.h +++ b/cc/settings.h @@ -6,6 +6,7 @@ #define CCSettings_h #include "webkit/glue/webkit_glue_export.h" +#include "cc/cc_export.h" namespace cc { @@ -13,7 +14,7 @@ namespace cc { // LayerTreeSettings if a ui and renderer compositor might not want the same // setting. -class Settings { +class CC_EXPORT Settings { public: static bool perTilePaintingEnabled(); static bool partialSwapEnabled(); diff --git a/cc/shared_quad_state.h b/cc/shared_quad_state.h index ff0faca..4abc8c9 100644 --- a/cc/shared_quad_state.h +++ b/cc/shared_quad_state.h @@ -8,10 +8,11 @@ #include "base/memory/scoped_ptr.h" #include "ui/gfx/rect.h" #include <public/WebTransformationMatrix.h> +#include "cc/cc_export.h" namespace cc { -struct SharedQuadState { +struct CC_EXPORT SharedQuadState { int id; // Transforms from quad's original content space to its target content space. diff --git a/cc/software_renderer.h b/cc/software_renderer.h index 40aa32d..9cd2e97 100644 --- a/cc/software_renderer.h +++ b/cc/software_renderer.h @@ -6,6 +6,7 @@ #define CCRendererSoftware_h #include "base/basictypes.h" +#include "cc/cc_export.h" #include "cc/direct_renderer.h" namespace WebKit { @@ -22,7 +23,7 @@ class TextureDrawQuad; class TileDrawQuad; class RenderPassDrawQuad; -class SoftwareRenderer : public DirectRenderer { +class CC_EXPORT SoftwareRenderer : public DirectRenderer { public: static scoped_ptr<SoftwareRenderer> create(RendererClient*, ResourceProvider*, WebKit::WebCompositorSoftwareOutputDevice*); virtual ~SoftwareRenderer(); diff --git a/cc/solid_color_draw_quad.h b/cc/solid_color_draw_quad.h index 43d2d67..490c9ed 100644 --- a/cc/solid_color_draw_quad.h +++ b/cc/solid_color_draw_quad.h @@ -6,6 +6,7 @@ #define CCSolidColorDrawQuad_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/draw_quad.h" #include "third_party/skia/include/core/SkColor.h" @@ -13,7 +14,7 @@ namespace cc { #pragma pack(push, 4) -class SolidColorDrawQuad : public DrawQuad { +class CC_EXPORT SolidColorDrawQuad : public DrawQuad { public: static scoped_ptr<SolidColorDrawQuad> create(const SharedQuadState*, const gfx::Rect&, SkColor); diff --git a/cc/solid_color_layer.h b/cc/solid_color_layer.h index 0f7396b..45a1997 100644 --- a/cc/solid_color_layer.h +++ b/cc/solid_color_layer.h @@ -6,13 +6,14 @@ #ifndef SolidColorLayerChromium_h #define SolidColorLayerChromium_h +#include "cc/cc_export.h" #include "cc/layer.h" namespace cc { // A Layer that renders a solid color. The color is specified by using // setBackgroundColor() on the base class. -class SolidColorLayer : public Layer { +class CC_EXPORT SolidColorLayer : public Layer { public: static scoped_refptr<SolidColorLayer> create(); diff --git a/cc/solid_color_layer_impl.h b/cc/solid_color_layer_impl.h index 922484d..4988097 100644 --- a/cc/solid_color_layer_impl.h +++ b/cc/solid_color_layer_impl.h @@ -5,12 +5,13 @@ #ifndef CCSolidColorLayerImpl_h #define CCSolidColorLayerImpl_h +#include "cc/cc_export.h" #include "cc/layer_impl.h" #include <public/WebTransformationMatrix.h> namespace cc { -class SolidColorLayerImpl : public LayerImpl { +class CC_EXPORT SolidColorLayerImpl : public LayerImpl { public: static scoped_ptr<SolidColorLayerImpl> create(int id) { diff --git a/cc/stream_video_draw_quad.h b/cc/stream_video_draw_quad.h index c258d01..a9cb4e3 100644 --- a/cc/stream_video_draw_quad.h +++ b/cc/stream_video_draw_quad.h @@ -6,6 +6,7 @@ #define CCStreamVideoDrawQuad_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/draw_quad.h" #include <public/WebTransformationMatrix.h> @@ -13,7 +14,7 @@ namespace cc { #pragma pack(push, 4) -class StreamVideoDrawQuad : public DrawQuad { +class CC_EXPORT StreamVideoDrawQuad : public DrawQuad { public: static scoped_ptr<StreamVideoDrawQuad> create(const SharedQuadState*, const gfx::Rect&, unsigned textureId, const WebKit::WebTransformationMatrix&); diff --git a/cc/switches.h b/cc/switches.h index f42839b..9a47b48 100644 --- a/cc/switches.h +++ b/cc/switches.h @@ -7,7 +7,7 @@ #ifndef CC_SWITCHES_H_ #define CC_SWITCHES_H_ -#include "webkit/glue/webkit_glue_export.h" +#include "cc/cc_export.h" // Since cc is used from the render process, anything that goes here also needs // to be added to render_process_host_impl.cc. @@ -15,12 +15,12 @@ namespace cc { namespace switches { -WEBKIT_GLUE_EXPORT extern const char kBackgroundColorInsteadOfCheckerboard[]; -WEBKIT_GLUE_EXPORT extern const char kDisableThreadedAnimation[]; -WEBKIT_GLUE_EXPORT extern const char kEnablePartialSwap[]; -WEBKIT_GLUE_EXPORT extern const char kEnablePerTilePainting[]; -WEBKIT_GLUE_EXPORT extern const char kEnablePinchInCompositor[]; -WEBKIT_GLUE_EXPORT extern const char kJankInsteadOfCheckerboard[]; +CC_EXPORT extern const char kBackgroundColorInsteadOfCheckerboard[]; +CC_EXPORT extern const char kDisableThreadedAnimation[]; +CC_EXPORT extern const char kEnablePartialSwap[]; +CC_EXPORT extern const char kEnablePerTilePainting[]; +CC_EXPORT extern const char kEnablePinchInCompositor[]; +CC_EXPORT extern const char kJankInsteadOfCheckerboard[]; } // namespace switches } // namespace cc diff --git a/cc/texture.h b/cc/texture.h index 2ab8859..b0b8e31 100644 --- a/cc/texture.h +++ b/cc/texture.h @@ -5,13 +5,14 @@ #ifndef CCTexture_h #define CCTexture_h +#include "cc/cc_export.h" #include "cc/resource_provider.h" #include "third_party/khronos/GLES2/gl2.h" #include "ui/gfx/size.h" namespace cc { -class Texture { +class CC_EXPORT Texture { public: Texture() : m_id(0) { } Texture(unsigned id, gfx::Size size, GLenum format) diff --git a/cc/texture_copier.h b/cc/texture_copier.h index e60f787..535208c 100644 --- a/cc/texture_copier.h +++ b/cc/texture_copier.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/program_binding.h" #include "cc/shader.h" #include "third_party/khronos/GLES2/gl2.h" @@ -18,7 +19,7 @@ class WebGraphicsContext3D; namespace cc { -class TextureCopier { +class CC_EXPORT TextureCopier { public: struct Parameters { unsigned sourceTexture; @@ -34,7 +35,7 @@ public: virtual ~TextureCopier() { } }; -class AcceleratedTextureCopier : public TextureCopier { +class CC_EXPORT AcceleratedTextureCopier : public TextureCopier { public: static scoped_ptr<AcceleratedTextureCopier> create(WebKit::WebGraphicsContext3D* context, bool usingBindUniforms) { diff --git a/cc/texture_draw_quad.h b/cc/texture_draw_quad.h index ea406a2..44e74d2 100644 --- a/cc/texture_draw_quad.h +++ b/cc/texture_draw_quad.h @@ -6,6 +6,7 @@ #define CCTextureDrawQuad_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/draw_quad.h" #include "ui/gfx/rect_f.h" @@ -13,7 +14,7 @@ namespace cc { #pragma pack(push, 4) -class TextureDrawQuad : public DrawQuad { +class CC_EXPORT TextureDrawQuad : public DrawQuad { public: static scoped_ptr<TextureDrawQuad> create(const SharedQuadState*, const gfx::Rect&, unsigned resourceId, bool premultipliedAlpha, const gfx::RectF& uvRect, bool flipped); gfx::RectF uvRect() const { return m_uvRect; } diff --git a/cc/texture_layer.h b/cc/texture_layer.h index 5fe9eeb..b5dad08 100644 --- a/cc/texture_layer.h +++ b/cc/texture_layer.h @@ -5,6 +5,7 @@ #ifndef TextureLayerChromium_h #define TextureLayerChromium_h +#include "cc/cc_export.h" #include "cc/layer.h" namespace WebKit { @@ -16,7 +17,7 @@ namespace cc { class TextureLayerClient; // A Layer containing a the rendered output of a plugin instance. -class TextureLayer : public Layer { +class CC_EXPORT TextureLayer : public Layer { public: // If this texture layer requires special preparation logic for each frame driven by // the compositor, pass in a non-nil client. Pass in a nil client pointer if texture updates diff --git a/cc/texture_layer_impl.h b/cc/texture_layer_impl.h index 4293be8..4283810 100644 --- a/cc/texture_layer_impl.h +++ b/cc/texture_layer_impl.h @@ -5,11 +5,12 @@ #ifndef CCTextureLayerImpl_h #define CCTextureLayerImpl_h +#include "cc/cc_export.h" #include "cc/layer_impl.h" namespace cc { -class TextureLayerImpl : public LayerImpl { +class CC_EXPORT TextureLayerImpl : public LayerImpl { public: static scoped_ptr<TextureLayerImpl> create(int id) { diff --git a/cc/texture_uploader.h b/cc/texture_uploader.h index f2a964d..25b8d6b 100644 --- a/cc/texture_uploader.h +++ b/cc/texture_uploader.h @@ -5,10 +5,12 @@ #ifndef CC_TEXTURE_UPLOADER_H_ #define CC_TEXTURE_UPLOADER_H_ +#include <set> + #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/scoped_ptr_deque.h" -#include <set> #include "third_party/khronos/GLES2/gl2.h" namespace WebKit { @@ -23,7 +25,7 @@ class Vector2d; namespace cc { -class TextureUploader { +class CC_EXPORT TextureUploader { public: static scoped_ptr<TextureUploader> create( WebKit::WebGraphicsContext3D* context, bool useMapTexSubImage) diff --git a/cc/thread.h b/cc/thread.h index a017c42..c05d75a 100644 --- a/cc/thread.h +++ b/cc/thread.h @@ -7,12 +7,13 @@ #include "base/callback.h" #include "base/basictypes.h" +#include "cc/cc_export.h" namespace cc { // Thread provides basic infrastructure for messaging with the compositor in a // platform-neutral way. -class Thread { +class CC_EXPORT Thread { public: virtual ~Thread() { } diff --git a/cc/thread_impl.h b/cc/thread_impl.h index 9dfcd88..46f7128 100644 --- a/cc/thread_impl.h +++ b/cc/thread_impl.h @@ -8,12 +8,13 @@ #include "base/callback.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop_proxy.h" +#include "cc/cc_export.h" #include "cc/thread.h" namespace cc { // Implements cc::Thread in terms of base::MessageLoopProxy. -class ThreadImpl : public Thread { +class CC_EXPORT ThreadImpl : public Thread { public: // Creates a ThreadImpl wrapping the current thread. static scoped_ptr<cc::Thread> createForCurrentThread(); diff --git a/cc/tile_draw_quad.h b/cc/tile_draw_quad.h index 2e4e89c..2380c04 100644 --- a/cc/tile_draw_quad.h +++ b/cc/tile_draw_quad.h @@ -6,6 +6,7 @@ #define CCTileDrawQuad_h #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/draw_quad.h" #include "third_party/khronos/GLES2/gl2.h" #include "ui/gfx/point.h" @@ -15,7 +16,7 @@ namespace cc { #pragma pack(push, 4) -class TileDrawQuad : public DrawQuad { +class CC_EXPORT TileDrawQuad : public DrawQuad { public: static scoped_ptr<TileDrawQuad> create(const SharedQuadState*, const gfx::Rect& quadRect, const gfx::Rect& opaqueRect, unsigned resourceId, const gfx::Vector2d& textureOffset, const gfx::Size& textureSize, GLint textureFilter, bool swizzleContents, bool leftEdgeAA, bool topEdgeAA, bool rightEdgeAA, bool bottomEdgeAA); diff --git a/cc/tiled_layer.h b/cc/tiled_layer.h index b468a8a..bc8fef5 100644 --- a/cc/tiled_layer.h +++ b/cc/tiled_layer.h @@ -5,14 +5,15 @@ #ifndef TiledLayerChromium_h #define TiledLayerChromium_h +#include "cc/cc_export.h" #include "cc/contents_scaling_layer.h" -#include "cc/layer_updater.h" #include "cc/layer_tiling_data.h" +#include "cc/layer_updater.h" namespace cc { class UpdatableTile; -class TiledLayer : public ContentsScalingLayer { +class CC_EXPORT TiledLayer : public ContentsScalingLayer { public: enum TilingOption { AlwaysTile, NeverTile, AutoTile }; diff --git a/cc/tiled_layer_impl.h b/cc/tiled_layer_impl.h index ce1ca83..2b78039 100644 --- a/cc/tiled_layer_impl.h +++ b/cc/tiled_layer_impl.h @@ -5,6 +5,7 @@ #ifndef CCTiledLayerImpl_h #define CCTiledLayerImpl_h +#include "cc/cc_export.h" #include "cc/layer_impl.h" #include <public/WebTransformationMatrix.h> @@ -13,7 +14,7 @@ namespace cc { class LayerTilingData; class DrawableTile; -class TiledLayerImpl : public LayerImpl { +class CC_EXPORT TiledLayerImpl : public LayerImpl { public: static scoped_ptr<TiledLayerImpl> create(int id) { diff --git a/cc/tiling_data.h b/cc/tiling_data.h index 6d052c0..0eb54d2 100644 --- a/cc/tiling_data.h +++ b/cc/tiling_data.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "base/logging.h" +#include "cc/cc_export.h" #include "ui/gfx/size.h" namespace gfx { @@ -16,7 +17,7 @@ class Vector2d; namespace cc { -class TilingData { +class CC_EXPORT TilingData { public: TilingData(gfx::Size max_texture_size, gfx::Size total_size, bool has_border_texels); ~TilingData(); diff --git a/cc/time_source.h b/cc/time_source.h index ae1252e..e80a465 100644 --- a/cc/time_source.h +++ b/cc/time_source.h @@ -7,6 +7,7 @@ #include "base/memory/ref_counted.h" #include "base/time.h" +#include "cc/cc_export.h" namespace cc { @@ -25,7 +26,7 @@ protected: // // Be sure to call setActive(false) before releasing your reference to the // timer, or it will keep on ticking! -class TimeSource : public base::RefCounted<TimeSource> { +class CC_EXPORT TimeSource : public base::RefCounted<TimeSource> { public: virtual void setClient(TimeSourceClient*) = 0; virtual void setActive(bool) = 0; diff --git a/cc/timing_function.h b/cc/timing_function.h index 67fe512..967dd13 100644 --- a/cc/timing_function.h +++ b/cc/timing_function.h @@ -7,11 +7,12 @@ #include "UnitBezier.h" #include "cc/animation_curve.h" +#include "cc/cc_export.h" namespace cc { // See http://www.w3.org/TR/css3-transitions/. -class TimingFunction : public FloatAnimationCurve { +class CC_EXPORT TimingFunction : public FloatAnimationCurve { public: virtual ~TimingFunction(); @@ -22,7 +23,7 @@ protected: TimingFunction(); }; -class CubicBezierTimingFunction : public TimingFunction { +class CC_EXPORT CubicBezierTimingFunction : public TimingFunction { public: static scoped_ptr<CubicBezierTimingFunction> create(double x1, double y1, double x2, double y2); virtual ~CubicBezierTimingFunction(); @@ -37,22 +38,22 @@ protected: UnitBezier m_curve; }; -class EaseTimingFunction { +class CC_EXPORT EaseTimingFunction { public: static scoped_ptr<TimingFunction> create(); }; -class EaseInTimingFunction { +class CC_EXPORT EaseInTimingFunction { public: static scoped_ptr<TimingFunction> create(); }; -class EaseOutTimingFunction { +class CC_EXPORT EaseOutTimingFunction { public: static scoped_ptr<TimingFunction> create(); }; -class EaseInOutTimingFunction { +class CC_EXPORT EaseInOutTimingFunction { public: static scoped_ptr<TimingFunction> create(); }; diff --git a/cc/tree_synchronizer.h b/cc/tree_synchronizer.h index 5931a59..61d55ae 100644 --- a/cc/tree_synchronizer.h +++ b/cc/tree_synchronizer.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/scoped_ptr_hash_map.h" namespace cc { @@ -15,7 +16,7 @@ class LayerImpl; class LayerTreeHostImpl; class Layer; -class TreeSynchronizer { +class CC_EXPORT TreeSynchronizer { public: // Accepts a Layer tree and returns a reference to a LayerImpl tree that duplicates the structure // of the Layer tree, reusing the LayerImpls in the tree provided by oldLayerImplRoot if possible. diff --git a/cc/video_layer.h b/cc/video_layer.h index 756c502..9440219 100644 --- a/cc/video_layer.h +++ b/cc/video_layer.h @@ -6,6 +6,7 @@ #define VideoLayerChromium_h #include "base/callback.h" +#include "cc/cc_export.h" #include "cc/layer.h" namespace WebKit { @@ -22,7 +23,7 @@ namespace cc { class VideoLayerImpl; // A Layer that contains a Video element. -class VideoLayer : public Layer { +class CC_EXPORT VideoLayer : public Layer { public: typedef base::Callback<media::VideoFrame* (WebKit::WebVideoFrame*)> FrameUnwrapper; diff --git a/cc/video_layer_impl.h b/cc/video_layer_impl.h index 079e882..ba300e5 100644 --- a/cc/video_layer_impl.h +++ b/cc/video_layer_impl.h @@ -7,6 +7,7 @@ #include "base/callback.h" #include "base/synchronization/lock.h" +#include "cc/cc_export.h" #include "cc/layer_impl.h" #include "media/base/video_frame.h" #include "third_party/khronos/GLES2/gl2.h" @@ -27,8 +28,8 @@ namespace cc { class LayerTreeHostImpl; class VideoLayerImpl; -class VideoLayerImpl : public LayerImpl - , public WebKit::WebVideoFrameProvider::Client { +class CC_EXPORT VideoLayerImpl : public LayerImpl + , public WebKit::WebVideoFrameProvider::Client { public: typedef base::Callback<media::VideoFrame* (WebKit::WebVideoFrame*)> FrameUnwrapper; diff --git a/cc/yuv_video_draw_quad.h b/cc/yuv_video_draw_quad.h index 979a492..3b26c31 100644 --- a/cc/yuv_video_draw_quad.h +++ b/cc/yuv_video_draw_quad.h @@ -7,12 +7,13 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "cc/cc_export.h" #include "cc/draw_quad.h" #include "cc/video_layer_impl.h" namespace cc { -class YUVVideoDrawQuad : public DrawQuad { +class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { public: static scoped_ptr<YUVVideoDrawQuad> create(const SharedQuadState*, const gfx::Rect&, const VideoLayerImpl::FramePlane& yPlane, const VideoLayerImpl::FramePlane& uPlane, const VideoLayerImpl::FramePlane& vPlane); diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index b7b8d765..ad502e4 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -33,6 +33,7 @@ 'sync_file_system_proto', 'variations_seed_proto', '../build/temp_gyp/googleurl.gyp:googleurl', + '../cc/cc.gyp:cc', '../content/content.gyp:content_browser', '../content/content.gyp:content_common', '../crypto/crypto.gyp:crypto', diff --git a/content/content_browser.gypi b/content/content_browser.gypi index 0996d37..ed61715 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -915,6 +915,7 @@ }, { # OS!="ios" 'dependencies': [ 'browser/debugger/devtools_resources.gyp:devtools_resources', + '../cc/cc.gyp:cc', '../net/net.gyp:http_server', '../ppapi/ppapi_internal.gyp:ppapi_ipc', '../printing/printing.gyp:printing', diff --git a/webkit/compositor_bindings/compositor_bindings.gyp b/webkit/compositor_bindings/compositor_bindings.gyp index 309a984..3b1196b 100644 --- a/webkit/compositor_bindings/compositor_bindings.gyp +++ b/webkit/compositor_bindings/compositor_bindings.gyp @@ -73,8 +73,11 @@ '../../base/base.gyp:base', '../../cc/cc.gyp:cc', '../../skia/skia.gyp:skia', + '../../ui/ui.gyp:ui', # We have to depend on WTF directly to pick up the correct defines for WTF headers - for instance USE_SYSTEM_MALLOC. '<(webkit_src_dir)/Source/WTF/WTF.gyp/WTF.gyp:wtf', + '<(webkit_src_dir)/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore_platform_geometry', + '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit_wtf_support', ], 'include_dirs': [ '../../cc', |