| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef COMPONENTS_MUS_SURFACES_DISPLAY_IMPL_H_ | 5 #ifndef COMPONENTS_MUS_SURFACES_DISPLAY_IMPL_H_ | 
| 6 #define COMPONENTS_MUS_SURFACES_DISPLAY_IMPL_H_ | 6 #define COMPONENTS_MUS_SURFACES_DISPLAY_IMPL_H_ | 
| 7 | 7 | 
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" | 
| 9 #include "cc/surfaces/display_client.h" | 9 #include "cc/surfaces/display_client.h" | 
| 10 #include "cc/surfaces/surface_factory.h" | 10 #include "cc/surfaces/surface_factory.h" | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 35                               public SurfacesContextProviderDelegate { | 35                               public SurfacesContextProviderDelegate { | 
| 36  public: | 36  public: | 
| 37   TopLevelDisplayClient(gfx::AcceleratedWidget widget, | 37   TopLevelDisplayClient(gfx::AcceleratedWidget widget, | 
| 38                         const scoped_refptr<GpuState>& gpu_state, | 38                         const scoped_refptr<GpuState>& gpu_state, | 
| 39                         const scoped_refptr<SurfacesState>& surfaces_state); | 39                         const scoped_refptr<SurfacesState>& surfaces_state); | 
| 40   ~TopLevelDisplayClient() override; | 40   ~TopLevelDisplayClient() override; | 
| 41 | 41 | 
| 42   void SubmitCompositorFrame(scoped_ptr<cc::CompositorFrame> frame, | 42   void SubmitCompositorFrame(scoped_ptr<cc::CompositorFrame> frame, | 
| 43                              const base::Closure& callback); | 43                              const base::Closure& callback); | 
| 44 | 44 | 
|  | 45   const cc::CompositorFrame* GetLastCompositorFrame() const; | 
|  | 46 | 
|  | 47   const cc::SurfaceId& surface_id() const { return cc_id_; } | 
| 45  private: | 48  private: | 
| 46   // DisplayClient implementation. | 49   // DisplayClient implementation. | 
| 47   // TODO(rjkroege, fsamuel): This won't work correctly with multiple displays. | 50   // TODO(rjkroege, fsamuel): This won't work correctly with multiple displays. | 
| 48   void CommitVSyncParameters(base::TimeTicks timebase, | 51   void CommitVSyncParameters(base::TimeTicks timebase, | 
| 49                              base::TimeDelta interval) override; | 52                              base::TimeDelta interval) override; | 
| 50   void OutputSurfaceLost() override; | 53   void OutputSurfaceLost() override; | 
| 51   void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override; | 54   void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override; | 
| 52 | 55 | 
| 53   // SurfacesContextProviderDelegate: | 56   // SurfacesContextProviderDelegate: | 
| 54   void OnVSyncParametersUpdated(int64_t timebase, int64_t interval) override; | 57   void OnVSyncParametersUpdated(int64_t timebase, int64_t interval) override; | 
| 55 | 58 | 
| 56   // SurfaceFactoryClient implementation. | 59   // SurfaceFactoryClient implementation. | 
| 57   void ReturnResources(const cc::ReturnedResourceArray& resources) override; | 60   void ReturnResources(const cc::ReturnedResourceArray& resources) override; | 
| 58 | 61 | 
| 59   scoped_refptr<SurfacesState> surfaces_state_; | 62   scoped_refptr<SurfacesState> surfaces_state_; | 
| 60   cc::SurfaceFactory factory_; | 63   cc::SurfaceFactory factory_; | 
| 61   cc::SurfaceId cc_id_; | 64   cc::SurfaceId cc_id_; | 
| 62 | 65 | 
| 63   gfx::Size last_submitted_frame_size_; | 66   gfx::Size last_submitted_frame_size_; | 
| 64   scoped_ptr<cc::CompositorFrame> pending_frame_; | 67   scoped_ptr<cc::CompositorFrame> pending_frame_; | 
| 65 | 68 | 
| 66   scoped_ptr<cc::Display> display_; | 69   scoped_ptr<cc::Display> display_; | 
| 67 | 70 | 
| 68   DISALLOW_COPY_AND_ASSIGN(TopLevelDisplayClient); | 71   DISALLOW_COPY_AND_ASSIGN(TopLevelDisplayClient); | 
| 69 }; | 72 }; | 
| 70 | 73 | 
| 71 }  // namespace mus | 74 }  // namespace mus | 
| 72 | 75 | 
| 73 #endif  // COMPONENTS_MUS_SURFACES_DISPLAY_IMPL_H_ | 76 #endif  // COMPONENTS_MUS_SURFACES_DISPLAY_IMPL_H_ | 
| OLD | NEW | 
|---|