| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 CC_SURFACES_DISPLAY_H_ | 5 #ifndef CC_SURFACES_DISPLAY_H_ |
| 6 #define CC_SURFACES_DISPLAY_H_ | 6 #define CC_SURFACES_DISPLAY_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/output/output_surface_client.h" | 9 #include "cc/output/output_surface_client.h" |
| 10 #include "cc/output/renderer.h" | 10 #include "cc/output/renderer.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 virtual ~Display(); | 45 virtual ~Display(); |
| 46 | 46 |
| 47 bool Initialize(scoped_ptr<OutputSurface> output_surface); | 47 bool Initialize(scoped_ptr<OutputSurface> output_surface); |
| 48 void Resize(SurfaceId id, const gfx::Size& new_size); | 48 void Resize(SurfaceId id, const gfx::Size& new_size); |
| 49 bool Draw(); | 49 bool Draw(); |
| 50 | 50 |
| 51 SurfaceId CurrentSurfaceId(); | 51 SurfaceId CurrentSurfaceId(); |
| 52 int GetMaxFramesPending(); | 52 int GetMaxFramesPending(); |
| 53 | 53 |
| 54 // OutputSurfaceClient implementation. | 54 // OutputSurfaceClient implementation. |
| 55 virtual void DeferredInitialize() OVERRIDE {} | 55 virtual void DeferredInitialize() override {} |
| 56 virtual void ReleaseGL() OVERRIDE {} | 56 virtual void ReleaseGL() override {} |
| 57 virtual void CommitVSyncParameters(base::TimeTicks timebase, | 57 virtual void CommitVSyncParameters(base::TimeTicks timebase, |
| 58 base::TimeDelta interval) OVERRIDE; | 58 base::TimeDelta interval) override; |
| 59 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) OVERRIDE {} | 59 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override {} |
| 60 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE {} | 60 virtual void BeginFrame(const BeginFrameArgs& args) override {} |
| 61 virtual void DidSwapBuffers() OVERRIDE; | 61 virtual void DidSwapBuffers() override; |
| 62 virtual void DidSwapBuffersComplete() OVERRIDE; | 62 virtual void DidSwapBuffersComplete() override; |
| 63 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE {} | 63 virtual void ReclaimResources(const CompositorFrameAck* ack) override {} |
| 64 virtual void DidLoseOutputSurface() OVERRIDE; | 64 virtual void DidLoseOutputSurface() override; |
| 65 virtual void SetExternalDrawConstraints( | 65 virtual void SetExternalDrawConstraints( |
| 66 const gfx::Transform& transform, | 66 const gfx::Transform& transform, |
| 67 const gfx::Rect& viewport, | 67 const gfx::Rect& viewport, |
| 68 const gfx::Rect& clip, | 68 const gfx::Rect& clip, |
| 69 const gfx::Rect& viewport_rect_for_tile_priority, | 69 const gfx::Rect& viewport_rect_for_tile_priority, |
| 70 const gfx::Transform& transform_for_tile_priority, | 70 const gfx::Transform& transform_for_tile_priority, |
| 71 bool resourceless_software_draw) OVERRIDE {} | 71 bool resourceless_software_draw) override {} |
| 72 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; | 72 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; |
| 73 virtual void SetTreeActivationCallback( | 73 virtual void SetTreeActivationCallback( |
| 74 const base::Closure& callback) OVERRIDE {} | 74 const base::Closure& callback) override {} |
| 75 | 75 |
| 76 // RendererClient implementation. | 76 // RendererClient implementation. |
| 77 virtual void SetFullRootLayerDamage() OVERRIDE {} | 77 virtual void SetFullRootLayerDamage() override {} |
| 78 | 78 |
| 79 // SurfaceDamageObserver implementation. | 79 // SurfaceDamageObserver implementation. |
| 80 virtual void OnSurfaceDamaged(SurfaceId surface) OVERRIDE; | 80 virtual void OnSurfaceDamaged(SurfaceId surface) override; |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 void InitializeRenderer(); | 83 void InitializeRenderer(); |
| 84 | 84 |
| 85 DisplayClient* client_; | 85 DisplayClient* client_; |
| 86 SurfaceManager* manager_; | 86 SurfaceManager* manager_; |
| 87 SharedBitmapManager* bitmap_manager_; | 87 SharedBitmapManager* bitmap_manager_; |
| 88 SurfaceId current_surface_id_; | 88 SurfaceId current_surface_id_; |
| 89 gfx::Size current_surface_size_; | 89 gfx::Size current_surface_size_; |
| 90 LayerTreeSettings settings_; | 90 LayerTreeSettings settings_; |
| 91 scoped_ptr<OutputSurface> output_surface_; | 91 scoped_ptr<OutputSurface> output_surface_; |
| 92 scoped_ptr<ResourceProvider> resource_provider_; | 92 scoped_ptr<ResourceProvider> resource_provider_; |
| 93 scoped_ptr<SurfaceAggregator> aggregator_; | 93 scoped_ptr<SurfaceAggregator> aggregator_; |
| 94 scoped_ptr<DirectRenderer> renderer_; | 94 scoped_ptr<DirectRenderer> renderer_; |
| 95 scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_; | 95 scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_; |
| 96 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; | 96 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; |
| 97 | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(Display); | 98 DISALLOW_COPY_AND_ASSIGN(Display); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace cc | 101 } // namespace cc |
| 102 | 102 |
| 103 #endif // CC_SURFACES_DISPLAY_H_ | 103 #endif // CC_SURFACES_DISPLAY_H_ |
| OLD | NEW |