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

Side by Side Diff: content/browser/compositor/delegated_frame_host.h

Issue 1759323003: Add resize gutter layers to DelegatedFrameHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | content/browser/compositor/delegated_frame_host.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 CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 195
196 bool ShouldSkipFrame(gfx::Size size_in_dip) const; 196 bool ShouldSkipFrame(gfx::Size size_in_dip) const;
197 197
198 // Lazily grab a resize lock if the aura window size doesn't match the current 198 // Lazily grab a resize lock if the aura window size doesn't match the current
199 // frame size, to give time to the renderer. 199 // frame size, to give time to the renderer.
200 void MaybeCreateResizeLock(); 200 void MaybeCreateResizeLock();
201 201
202 // Checks if the resize lock can be released because we received an new frame. 202 // Checks if the resize lock can be released because we received an new frame.
203 void CheckResizeLock(); 203 void CheckResizeLock();
204 204
205 // Update the layers for the resize gutters to the right and bottom of the
206 // surface layer.
207 void UpdateGutters();
208
205 // Called after async thumbnailer task completes. Scales and crops the result 209 // Called after async thumbnailer task completes. Scales and crops the result
206 // of the copy. 210 // of the copy.
207 static void CopyFromCompositingSurfaceHasResultForVideo( 211 static void CopyFromCompositingSurfaceHasResultForVideo(
208 base::WeakPtr<DelegatedFrameHost> rwhva, 212 base::WeakPtr<DelegatedFrameHost> rwhva,
209 scoped_refptr<OwnedMailbox> subscriber_texture, 213 scoped_refptr<OwnedMailbox> subscriber_texture,
210 scoped_refptr<media::VideoFrame> video_frame, 214 scoped_refptr<media::VideoFrame> video_frame,
211 const base::Callback<void(const gfx::Rect&, bool)>& callback, 215 const base::Callback<void(const gfx::Rect&, bool)>& callback,
212 scoped_ptr<cc::CopyOutputResult> result); 216 scoped_ptr<cc::CopyOutputResult> result);
213 static void CopyFromCompositingSurfaceFinishedForVideo( 217 static void CopyFromCompositingSurfaceFinishedForVideo(
214 base::WeakPtr<DelegatedFrameHost> rwhva, 218 base::WeakPtr<DelegatedFrameHost> rwhva,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 254
251 // The number of delegated frame acks that are pending, to delay resource 255 // The number of delegated frame acks that are pending, to delay resource
252 // returns until the acks are sent. 256 // returns until the acks are sent.
253 int pending_delegated_ack_count_; 257 int pending_delegated_ack_count_;
254 258
255 // True after a delegated frame has been skipped, until a frame is not 259 // True after a delegated frame has been skipped, until a frame is not
256 // skipped. 260 // skipped.
257 bool skipped_frames_; 261 bool skipped_frames_;
258 std::vector<ui::LatencyInfo> skipped_latency_info_list_; 262 std::vector<ui::LatencyInfo> skipped_latency_info_list_;
259 263
264 scoped_ptr<ui::Layer> right_gutter_;
265 scoped_ptr<ui::Layer> bottom_gutter_;
266
267 // This is the last root background color from a swapped frame.
268 SkColor background_color_;
269
260 // State for rendering into a Surface. 270 // State for rendering into a Surface.
261 scoped_ptr<cc::SurfaceIdAllocator> id_allocator_; 271 scoped_ptr<cc::SurfaceIdAllocator> id_allocator_;
262 scoped_ptr<cc::SurfaceFactory> surface_factory_; 272 scoped_ptr<cc::SurfaceFactory> surface_factory_;
263 cc::SurfaceId surface_id_; 273 cc::SurfaceId surface_id_;
264 gfx::Size current_surface_size_; 274 gfx::Size current_surface_size_;
265 float current_scale_factor_; 275 float current_scale_factor_;
266 cc::ReturnedResourceArray surface_returned_resources_; 276 cc::ReturnedResourceArray surface_returned_resources_;
267 277
268 // This lock is the one waiting for a frame of the right size to come back 278 // This lock is the one waiting for a frame of the right size to come back
269 // from the renderer/GPU process. It is set from the moment the aura window 279 // from the renderer/GPU process. It is set from the moment the aura window
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 yuv_readback_pipeline_; 316 yuv_readback_pipeline_;
307 317
308 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; 318 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_;
309 319
310 cc::BeginFrameSource* begin_frame_source_; 320 cc::BeginFrameSource* begin_frame_source_;
311 }; 321 };
312 322
313 } // namespace content 323 } // namespace content
314 324
315 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ 325 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/delegated_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698