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

Side by Side Diff: ui/compositor/layer.h

Issue 2575503003: Getting rid of frame_size_in_dip in Layer::SetShowSurface (Closed)
Patch Set: up Created 4 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_COMPOSITOR_LAYER_H_ 5 #ifndef UI_COMPOSITOR_LAYER_H_
6 #define UI_COMPOSITOR_LAYER_H_ 6 #define UI_COMPOSITOR_LAYER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 std::unique_ptr<cc::SingleReleaseCallback> release_callback, 289 std::unique_ptr<cc::SingleReleaseCallback> release_callback,
290 gfx::Size texture_size_in_dip); 290 gfx::Size texture_size_in_dip);
291 void SetTextureSize(gfx::Size texture_size_in_dip); 291 void SetTextureSize(gfx::Size texture_size_in_dip);
292 void SetTextureFlipped(bool flipped); 292 void SetTextureFlipped(bool flipped);
293 bool TextureFlipped() const; 293 bool TextureFlipped() const;
294 294
295 // Begins showing content from a surface with a particular id. 295 // Begins showing content from a surface with a particular id.
296 void SetShowSurface(const cc::SurfaceId& surface_id, 296 void SetShowSurface(const cc::SurfaceId& surface_id,
297 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback, 297 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback,
298 const cc::SurfaceLayer::RequireCallback& require_callback, 298 const cc::SurfaceLayer::RequireCallback& require_callback,
299 gfx::Size surface_size, 299 gfx::Size surface_size,
sadrul 2016/12/14 01:06:25 Can you rename this to be |surface_size_in_pixels|
Fady Samuel 2016/12/14 01:11:44 While you're at it, we tend to prefer pass by cons
Saman Sami 2016/12/14 01:28:02 Done.
300 float scale, 300 float scale);
301 gfx::Size frame_size_in_dip);
302 301
303 bool has_external_content() { 302 bool has_external_content() {
304 return texture_layer_.get() || surface_layer_.get(); 303 return texture_layer_.get() || surface_layer_.get();
305 } 304 }
306 305
307 // Show a solid color instead of delegated or surface contents. 306 // Show a solid color instead of delegated or surface contents.
308 void SetShowSolidColorContent(); 307 void SetShowSolidColorContent();
309 308
310 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. 309 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR.
311 void SetColor(SkColor color); 310 void SetColor(SkColor color);
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 // The size of the frame or texture in DIP, set when SetShowDelegatedContent 536 // The size of the frame or texture in DIP, set when SetShowDelegatedContent
538 // or SetTextureMailbox was called. 537 // or SetTextureMailbox was called.
539 gfx::Size frame_size_in_dip_; 538 gfx::Size frame_size_in_dip_;
540 539
541 DISALLOW_COPY_AND_ASSIGN(Layer); 540 DISALLOW_COPY_AND_ASSIGN(Layer);
542 }; 541 };
543 542
544 } // namespace ui 543 } // namespace ui
545 544
546 #endif // UI_COMPOSITOR_LAYER_H_ 545 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698