Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3348)

Unified Diff: cc/surfaces/display.h

Issue 319133010: Switch Display to use ResourceProvider and *Renderer directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/surfaces/display.cc » ('j') | cc/surfaces/display.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.h
diff --git a/cc/surfaces/display.h b/cc/surfaces/display.h
index ff2632b8cd716dac4f7e7e9e1d56d1bb3db3b6db..a36384b84b1ff0c459489769e86ccd610d6d917f 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,44 @@ 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_;
+ void InitializeOutputSurface();
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);
};
« no previous file with comments | « no previous file | cc/surfaces/display.cc » ('j') | cc/surfaces/display.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698