| Index: cc/surfaces/display.h
|
| diff --git a/cc/surfaces/display.h b/cc/surfaces/display.h
|
| index ff2632b8cd716dac4f7e7e9e1d56d1bb3db3b6db..5b9e322087f1fc9cc2fe65e2b3925958c7cfa33f 100644
|
| --- a/cc/surfaces/display.h
|
| +++ b/cc/surfaces/display.h
|
| @@ -4,14 +4,11 @@
|
|
|
| #include "base/memory/scoped_ptr.h"
|
|
|
| -#include "cc/layers/delegated_frame_resource_collection.h"
|
| -#include "cc/layers/delegated_renderer_layer.h"
|
| #include "cc/output/output_surface_client.h"
|
| +#include "cc/output/renderer.h"
|
| #include "cc/surfaces/surface_aggregator.h"
|
| #include "cc/surfaces/surface_client.h"
|
| #include "cc/surfaces/surfaces_export.h"
|
| -#include "cc/trees/layer_tree_host_client.h"
|
| -#include "cc/trees/layer_tree_host_single_thread_client.h"
|
|
|
| namespace gfx {
|
| class Size;
|
| @@ -21,18 +18,15 @@ namespace cc {
|
|
|
| class DirectRenderer;
|
| class DisplayClient;
|
| -class LayerTreeHost;
|
| class OutputSurface;
|
| class ResourceProvider;
|
| class SharedBitmapManager;
|
| class Surface;
|
| class SurfaceManager;
|
|
|
| -class CC_SURFACES_EXPORT Display
|
| - : public SurfaceClient,
|
| - public DelegatedFrameResourceCollectionClient,
|
| - NON_EXPORTED_BASE(public LayerTreeHostClient),
|
| - NON_EXPORTED_BASE(public LayerTreeHostSingleThreadClient) {
|
| +class CC_SURFACES_EXPORT Display : public SurfaceClient,
|
| + public OutputSurfaceClient,
|
| + public RendererClient {
|
| public:
|
| Display(DisplayClient* client,
|
| SurfaceManager* manager,
|
| @@ -44,47 +38,42 @@ class CC_SURFACES_EXPORT Display
|
|
|
| int CurrentSurfaceID();
|
|
|
| - // LayerTreeHostClient implementation.
|
| - virtual void WillBeginMainFrame(int frame_id) OVERRIDE {}
|
| - virtual void DidBeginMainFrame() OVERRIDE {}
|
| - virtual void Animate(base::TimeTicks frame_begin_time) OVERRIDE {}
|
| - virtual void Layout() OVERRIDE {}
|
| - virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta,
|
| - float page_scale) OVERRIDE {}
|
| - virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) OVERRIDE;
|
| - virtual void DidInitializeOutputSurface() OVERRIDE {}
|
| - virtual void WillCommit() OVERRIDE {}
|
| - virtual void DidCommit() OVERRIDE {}
|
| - virtual void DidCommitAndDrawFrame() OVERRIDE {}
|
| - virtual void DidCompleteSwapBuffers() OVERRIDE {}
|
| -
|
| - // LayerTreeHostSingleThreadClient implementation.
|
| - virtual void ScheduleComposite() OVERRIDE;
|
| - virtual void ScheduleAnimation() OVERRIDE;
|
| - virtual void DidPostSwapBuffers() OVERRIDE {}
|
| - virtual void DidAbortSwapBuffers() OVERRIDE {}
|
| -
|
| - // DelegatedFrameResourceCollectionClient implementation.
|
| - virtual void UnusedResourcesAreAvailable() OVERRIDE {}
|
| + // OutputSurfaceClient implementation.
|
| + virtual void DeferredInitialize() OVERRIDE;
|
| + virtual void ReleaseGL() OVERRIDE;
|
| + virtual void CommitVSyncParameters(base::TimeTicks timebase,
|
| + base::TimeDelta interval) OVERRIDE;
|
| + virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) OVERRIDE;
|
| + virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE;
|
| + virtual void DidSwapBuffers() OVERRIDE;
|
| + virtual void DidSwapBuffersComplete() OVERRIDE;
|
| + virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE;
|
| + virtual void DidLoseOutputSurface() OVERRIDE;
|
| + virtual void SetExternalDrawConstraints(
|
| + const gfx::Transform& transform,
|
| + const gfx::Rect& viewport,
|
| + const gfx::Rect& clip,
|
| + bool valid_for_tile_management) OVERRIDE;
|
| + virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE;
|
| + virtual void SetTreeActivationCallback(
|
| + const base::Closure& callback) OVERRIDE;
|
| +
|
| + // RendererClient implementation.
|
| + virtual void SetFullRootLayerDamage() OVERRIDE;
|
|
|
| // SurfaceClient implementation.
|
| virtual void ReturnResources(const ReturnedResourceArray& resources) OVERRIDE;
|
|
|
| private:
|
| - void DoComposite();
|
| -
|
| - bool scheduled_draw_;
|
| -
|
| DisplayClient* client_;
|
| SurfaceManager* manager_;
|
| SurfaceAggregator aggregator_;
|
| SharedBitmapManager* bitmap_manager_;
|
| scoped_ptr<Surface> current_surface_;
|
| - scoped_ptr<LayerTreeHost> layer_tree_host_;
|
| - scoped_refptr<DelegatedFrameResourceCollection> resource_collection_;
|
| - scoped_refptr<DelegatedFrameProvider> delegated_frame_provider_;
|
| - scoped_refptr<DelegatedRendererLayer> delegated_layer_;
|
| - base::WeakPtrFactory<Display> schedule_draw_factory_;
|
| + scoped_ptr<OutputSurface> output_surface_;
|
| + scoped_ptr<ResourceProvider> resource_provider_;
|
| + scoped_ptr<DirectRenderer> renderer_;
|
| + int child_id_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Display);
|
| };
|
|
|