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

Side by Side Diff: cc/surfaces/display.h

Issue 1009013002: Use NOTREACHED in Display OutputSurfaceClient implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/surfaces/display.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // device_scale_factor is used to communicate to the external window system 59 // device_scale_factor is used to communicate to the external window system
60 // what scale this was rendered at. 60 // what scale this was rendered at.
61 void SetSurfaceId(SurfaceId id, float device_scale_factor); 61 void SetSurfaceId(SurfaceId id, float device_scale_factor);
62 void Resize(const gfx::Size& new_size); 62 void Resize(const gfx::Size& new_size);
63 bool Draw(); 63 bool Draw();
64 64
65 SurfaceId CurrentSurfaceId(); 65 SurfaceId CurrentSurfaceId();
66 int GetMaxFramesPending(); 66 int GetMaxFramesPending();
67 67
68 // OutputSurfaceClient implementation. 68 // OutputSurfaceClient implementation.
69 void DeferredInitialize() override {} 69 void DeferredInitialize() override;
70 void ReleaseGL() override {} 70 void ReleaseGL() override;
71 void CommitVSyncParameters(base::TimeTicks timebase, 71 void CommitVSyncParameters(base::TimeTicks timebase,
72 base::TimeDelta interval) override; 72 base::TimeDelta interval) override;
73 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override {} 73 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override;
74 void DidSwapBuffers() override; 74 void DidSwapBuffers() override;
75 void DidSwapBuffersComplete() override; 75 void DidSwapBuffersComplete() override;
76 void ReclaimResources(const CompositorFrameAck* ack) override {} 76 void ReclaimResources(const CompositorFrameAck* ack) override;
77 void DidLoseOutputSurface() override; 77 void DidLoseOutputSurface() override;
78 void SetExternalDrawConstraints( 78 void SetExternalDrawConstraints(
79 const gfx::Transform& transform, 79 const gfx::Transform& transform,
80 const gfx::Rect& viewport, 80 const gfx::Rect& viewport,
81 const gfx::Rect& clip, 81 const gfx::Rect& clip,
82 const gfx::Rect& viewport_rect_for_tile_priority, 82 const gfx::Rect& viewport_rect_for_tile_priority,
83 const gfx::Transform& transform_for_tile_priority, 83 const gfx::Transform& transform_for_tile_priority,
84 bool resourceless_software_draw) override {} 84 bool resourceless_software_draw) override;
85 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; 85 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
86 void SetTreeActivationCallback(const base::Closure& callback) override {} 86 void SetTreeActivationCallback(const base::Closure& callback) override;
87 void OnDraw() override; 87 void OnDraw() override;
88 88
89 // RendererClient implementation. 89 // RendererClient implementation.
90 void SetFullRootLayerDamage() override {} 90 void SetFullRootLayerDamage() override;
91 91
92 // SurfaceDamageObserver implementation. 92 // SurfaceDamageObserver implementation.
93 void OnSurfaceDamaged(SurfaceId surface, bool* changed) override; 93 void OnSurfaceDamaged(SurfaceId surface, bool* changed) override;
94 94
95 private: 95 private:
96 void InitializeRenderer(); 96 void InitializeRenderer();
97 97
98 DisplayClient* client_; 98 DisplayClient* client_;
99 SurfaceManager* manager_; 99 SurfaceManager* manager_;
100 SharedBitmapManager* bitmap_manager_; 100 SharedBitmapManager* bitmap_manager_;
101 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 101 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
102 RendererSettings settings_; 102 RendererSettings settings_;
103 SurfaceId current_surface_id_; 103 SurfaceId current_surface_id_;
104 gfx::Size current_surface_size_; 104 gfx::Size current_surface_size_;
105 float device_scale_factor_; 105 float device_scale_factor_;
106 scoped_ptr<OutputSurface> output_surface_; 106 scoped_ptr<OutputSurface> output_surface_;
107 scoped_ptr<ResourceProvider> resource_provider_; 107 scoped_ptr<ResourceProvider> resource_provider_;
108 scoped_ptr<SurfaceAggregator> aggregator_; 108 scoped_ptr<SurfaceAggregator> aggregator_;
109 scoped_ptr<DirectRenderer> renderer_; 109 scoped_ptr<DirectRenderer> renderer_;
110 scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_; 110 scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_;
111 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; 111 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
112 std::vector<ui::LatencyInfo> stored_latency_info_; 112 std::vector<ui::LatencyInfo> stored_latency_info_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(Display); 114 DISALLOW_COPY_AND_ASSIGN(Display);
115 }; 115 };
116 116
117 } // namespace cc 117 } // namespace cc
118 118
119 #endif // CC_SURFACES_DISPLAY_H_ 119 #endif // CC_SURFACES_DISPLAY_H_
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698