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

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

Issue 2136413002: Update Surface ID Terminology (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed webkit_unit_tests Created 4 years, 5 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
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 <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 std::unique_ptr<OutputSurface> output_surface, 65 std::unique_ptr<OutputSurface> output_surface,
66 std::unique_ptr<DisplayScheduler> scheduler, 66 std::unique_ptr<DisplayScheduler> scheduler,
67 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter); 67 std::unique_ptr<TextureMailboxDeleter> texture_mailbox_deleter);
68 68
69 ~Display() override; 69 ~Display() override;
70 70
71 void Initialize(DisplayClient* client); 71 void Initialize(DisplayClient* client);
72 72
73 // device_scale_factor is used to communicate to the external window system 73 // device_scale_factor is used to communicate to the external window system
74 // what scale this was rendered at. 74 // what scale this was rendered at.
75 void SetSurfaceId(SurfaceId id, float device_scale_factor); 75 void SetSurfaceId(const SurfaceId& id, float device_scale_factor);
76 void Resize(const gfx::Size& new_size); 76 void Resize(const gfx::Size& new_size);
77 void SetColorSpace(const gfx::ColorSpace& color_space); 77 void SetColorSpace(const gfx::ColorSpace& color_space);
78 void SetExternalClip(const gfx::Rect& clip); 78 void SetExternalClip(const gfx::Rect& clip);
79 void SetOutputIsSecure(bool secure); 79 void SetOutputIsSecure(bool secure);
80 80
81 SurfaceId CurrentSurfaceId(); 81 const SurfaceId& CurrentSurfaceId();
82 82
83 // DisplaySchedulerClient implementation. 83 // DisplaySchedulerClient implementation.
84 bool DrawAndSwap() override; 84 bool DrawAndSwap() override;
85 85
86 // OutputSurfaceClient implementation. 86 // OutputSurfaceClient implementation.
87 void CommitVSyncParameters(base::TimeTicks timebase, 87 void CommitVSyncParameters(base::TimeTicks timebase,
88 base::TimeDelta interval) override; 88 base::TimeDelta interval) override;
89 void SetBeginFrameSource(BeginFrameSource* source) override; 89 void SetBeginFrameSource(BeginFrameSource* source) override;
90 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override; 90 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override;
91 void DidSwapBuffers() override; 91 void DidSwapBuffers() override;
92 void DidSwapBuffersComplete() override; 92 void DidSwapBuffersComplete() override;
93 void DidReceiveTextureInUseResponses( 93 void DidReceiveTextureInUseResponses(
94 const gpu::TextureInUseResponses& responses) override; 94 const gpu::TextureInUseResponses& responses) override;
95 void ReclaimResources(const CompositorFrameAck* ack) override; 95 void ReclaimResources(const CompositorFrameAck* ack) override;
96 void DidLoseOutputSurface() override; 96 void DidLoseOutputSurface() override;
97 void SetExternalTilePriorityConstraints( 97 void SetExternalTilePriorityConstraints(
98 const gfx::Rect& viewport_rect, 98 const gfx::Rect& viewport_rect,
99 const gfx::Transform& transform) override; 99 const gfx::Transform& transform) override;
100 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; 100 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
101 void SetTreeActivationCallback(const base::Closure& callback) override; 101 void SetTreeActivationCallback(const base::Closure& callback) override;
102 void OnDraw(const gfx::Transform& transform, 102 void OnDraw(const gfx::Transform& transform,
103 const gfx::Rect& viewport, 103 const gfx::Rect& viewport,
104 const gfx::Rect& clip, 104 const gfx::Rect& clip,
105 bool resourceless_software_draw) override; 105 bool resourceless_software_draw) override;
106 106
107 // RendererClient implementation. 107 // RendererClient implementation.
108 void SetFullRootLayerDamage() override; 108 void SetFullRootLayerDamage() override;
109 109
110 // SurfaceDamageObserver implementation. 110 // SurfaceDamageObserver implementation.
111 void OnSurfaceDamaged(SurfaceId surface, bool* changed) override; 111 void OnSurfaceDamaged(const SurfaceId& surface, bool* changed) override;
112 112
113 void SetEnlargePassTextureAmountForTesting( 113 void SetEnlargePassTextureAmountForTesting(
114 const gfx::Size& enlarge_texture_amount) { 114 const gfx::Size& enlarge_texture_amount) {
115 enlarge_texture_amount_ = enlarge_texture_amount; 115 enlarge_texture_amount_ = enlarge_texture_amount;
116 } 116 }
117 117
118 private: 118 private:
119 void InitializeRenderer(); 119 void InitializeRenderer();
120 void UpdateRootSurfaceResourcesLocked(); 120 void UpdateRootSurfaceResourcesLocked();
121 121
(...skipping 24 matching lines...) Expand all
146 SoftwareRenderer* software_renderer_ = nullptr; 146 SoftwareRenderer* software_renderer_ = nullptr;
147 std::vector<ui::LatencyInfo> stored_latency_info_; 147 std::vector<ui::LatencyInfo> stored_latency_info_;
148 148
149 private: 149 private:
150 DISALLOW_COPY_AND_ASSIGN(Display); 150 DISALLOW_COPY_AND_ASSIGN(Display);
151 }; 151 };
152 152
153 } // namespace cc 153 } // namespace cc
154 154
155 #endif // CC_SURFACES_DISPLAY_H_ 155 #endif // CC_SURFACES_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698