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

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

Issue 2575503003: Getting rid of frame_size_in_dip in Layer::SetShowSurface (Closed)
Patch Set: test 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
« no previous file with comments | « content/browser/renderer_host/delegated_frame_host.cc ('k') | ui/compositor/layer.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 (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 const gfx::Size& surface_size_in_pixels,
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 void didUpdateMainThreadScrollingReasons() override; 380 void didUpdateMainThreadScrollingReasons() override;
382 void didChangeScrollbarsHidden(bool) override; 381 void didChangeScrollbarsHidden(bool) override;
383 382
384 // Triggers a call to SwitchToLayer. 383 // Triggers a call to SwitchToLayer.
385 void SwitchCCLayerForTest(); 384 void SwitchCCLayerForTest();
386 385
387 const cc::Region& damaged_region_for_testing() const { 386 const cc::Region& damaged_region_for_testing() const {
388 return damaged_region_; 387 return damaged_region_;
389 } 388 }
390 389
390 const gfx::Size& frame_size_in_dip() const { return frame_size_in_dip_; }
sadrul 2016/12/14 20:12:41 Like the one above: add a _for_testing() at the en
391
391 private: 392 private:
392 friend class LayerOwner; 393 friend class LayerOwner;
393 class LayerMirror; 394 class LayerMirror;
394 395
395 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); 396 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators);
396 397
397 // Stacks |child| above or below |other|. Helper method for StackAbove() and 398 // Stacks |child| above or below |other|. Helper method for StackAbove() and
398 // StackBelow(). 399 // StackBelow().
399 void StackRelativeTo(Layer* child, Layer* other, bool above); 400 void StackRelativeTo(Layer* child, Layer* other, bool above);
400 401
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 // The size of the frame or texture in DIP, set when SetShowDelegatedContent 538 // The size of the frame or texture in DIP, set when SetShowDelegatedContent
538 // or SetTextureMailbox was called. 539 // or SetTextureMailbox was called.
539 gfx::Size frame_size_in_dip_; 540 gfx::Size frame_size_in_dip_;
540 541
541 DISALLOW_COPY_AND_ASSIGN(Layer); 542 DISALLOW_COPY_AND_ASSIGN(Layer);
542 }; 543 };
543 544
544 } // namespace ui 545 } // namespace ui
545 546
546 #endif // UI_COMPOSITOR_LAYER_H_ 547 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/delegated_frame_host.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698