Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/memory/scoped_ptr.h" | |
| 6 | |
| 7 #include "cc/layers/delegated_frame_resource_collection.h" | |
| 8 #include "cc/layers/delegated_renderer_layer.h" | |
| 9 #include "cc/output/output_surface_client.h" | |
| 10 #include "cc/surfaces/surface_aggregator.h" | |
| 11 #include "cc/surfaces/surface_client.h" | |
| 12 #include "cc/surfaces/surfaces_export.h" | |
| 13 #include "cc/trees/layer_tree_host_client.h" | |
| 14 #include "cc/trees/layer_tree_host_single_thread_client.h" | |
| 15 | |
| 16 namespace gfx { | |
| 17 class Size; | |
| 18 } | |
| 19 | |
| 20 namespace cc { | |
| 21 | |
| 22 class DirectRenderer; | |
| 23 class DisplayClient; | |
| 24 class LayerTreeHost; | |
| 25 class OutputSurface; | |
| 26 class ResourceProvider; | |
| 27 class Surface; | |
| 28 class SurfaceManager; | |
| 29 | |
| 30 class CC_SURFACES_EXPORT Display | |
| 31 : public SurfaceClient, | |
| 32 public DelegatedFrameResourceCollectionClient, | |
| 33 NON_EXPORTED_BASE(public LayerTreeHostClient), | |
| 34 NON_EXPORTED_BASE(public LayerTreeHostSingleThreadClient) { | |
| 35 public: | |
| 36 Display(DisplayClient* client, SurfaceManager* manager); | |
| 37 virtual ~Display(); | |
| 38 | |
| 39 void Resize(const gfx::Size& new_size); | |
| 40 bool Draw(); | |
| 41 | |
| 42 int CurrentSurfaceID(); | |
| 43 | |
| 44 virtual void WillBeginMainFrame(int frame_id) OVERRIDE {} | |
|
jamesr
2014/05/28 22:01:28
add some sort of comment indicating that these are
| |
| 45 virtual void DidBeginMainFrame() OVERRIDE {} | |
| 46 virtual void Animate(base::TimeTicks frame_begin_time) OVERRIDE {} | |
| 47 virtual void Layout() OVERRIDE {} | |
| 48 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, | |
| 49 float page_scale) OVERRIDE {} | |
| 50 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) OVERRIDE; | |
| 51 virtual void DidInitializeOutputSurface() OVERRIDE {} | |
| 52 virtual void WillCommit() OVERRIDE {} | |
| 53 virtual void DidCommit() OVERRIDE {} | |
| 54 virtual void DidCommitAndDrawFrame() OVERRIDE {} | |
| 55 virtual void DidCompleteSwapBuffers() OVERRIDE {} | |
| 56 | |
| 57 virtual void ScheduleComposite() OVERRIDE; | |
|
jamesr
2014/05/28 22:01:28
ditto for LTHSTClient
| |
| 58 virtual void ScheduleAnimation() OVERRIDE { ScheduleComposite(); } | |
| 59 virtual void DidPostSwapBuffers() OVERRIDE {} | |
| 60 virtual void DidAbortSwapBuffers() OVERRIDE {} | |
| 61 | |
| 62 virtual void UnusedResourcesAreAvailable() OVERRIDE {} | |
|
jamesr
2014/05/28 22:01:28
same for DFRCC
| |
| 63 | |
| 64 // SurfaceClient implementation. | |
| 65 virtual void ReturnResources(const ReturnedResourceArray& resources) OVERRIDE; | |
| 66 | |
| 67 private: | |
| 68 void DoComposite(); | |
| 69 | |
| 70 bool scheduled_draw_; | |
| 71 | |
| 72 DisplayClient* client_; | |
| 73 SurfaceManager* manager_; | |
| 74 SurfaceAggregator aggregator_; | |
| 75 scoped_ptr<Surface> current_surface_; | |
| 76 scoped_ptr<LayerTreeHost> layer_tree_host_; | |
| 77 scoped_refptr<DelegatedFrameResourceCollection> resource_collection_; | |
| 78 scoped_refptr<DelegatedFrameProvider> delegated_frame_provider_; | |
| 79 scoped_refptr<DelegatedRendererLayer> delegated_layer_; | |
| 80 | |
| 81 DISALLOW_COPY_AND_ASSIGN(Display); | |
| 82 }; | |
| 83 | |
| 84 } // namespace cc | |
| OLD | NEW |