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

Side by Side Diff: cc/layers/layer_impl.h

Issue 1479883002: cc: Fix draw transform computation for non-drawn layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove LayerImpl::draw_transform() Created 5 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_LAYERS_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // is responsible for calling set_needs_update_draw_properties on the tree 378 // is responsible for calling set_needs_update_draw_properties on the tree
379 // so that its list can be recreated. 379 // so that its list can be recreated.
380 void ClearRenderSurfaceLayerList(); 380 void ClearRenderSurfaceLayerList();
381 void SetHasRenderSurface(bool has_render_surface); 381 void SetHasRenderSurface(bool has_render_surface);
382 382
383 RenderSurfaceImpl* render_surface() const { return render_surface_.get(); } 383 RenderSurfaceImpl* render_surface() const { return render_surface_.get(); }
384 384
385 DrawProperties& draw_properties() { return draw_properties_; } 385 DrawProperties& draw_properties() { return draw_properties_; }
386 const DrawProperties& draw_properties() const { return draw_properties_; } 386 const DrawProperties& draw_properties() const { return draw_properties_; }
387 387
388 gfx::Transform DrawTransform() const;
389
388 // The following are shortcut accessors to get various information from 390 // The following are shortcut accessors to get various information from
389 // draw_properties_ 391 // draw_properties_
390 const gfx::Transform& draw_transform() const {
391 return draw_properties_.target_space_transform;
392 }
393 const gfx::Transform& screen_space_transform() const { 392 const gfx::Transform& screen_space_transform() const {
394 return draw_properties_.screen_space_transform; 393 return draw_properties_.screen_space_transform;
395 } 394 }
396 float draw_opacity() const { return draw_properties_.opacity; } 395 float draw_opacity() const { return draw_properties_.opacity; }
397 bool screen_space_transform_is_animating() const { 396 bool screen_space_transform_is_animating() const {
398 return draw_properties_.screen_space_transform_is_animating; 397 return draw_properties_.screen_space_transform_is_animating;
399 } 398 }
400 bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; } 399 bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; }
401 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; } 400 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; }
402 gfx::Rect drawable_content_rect() const { 401 gfx::Rect drawable_content_rect() const {
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 // If true, the layer or one of its descendants has a wheel or touch handler. 875 // If true, the layer or one of its descendants has a wheel or touch handler.
877 bool layer_or_descendant_has_input_handler_; 876 bool layer_or_descendant_has_input_handler_;
878 bool sorted_for_recursion_; 877 bool sorted_for_recursion_;
879 878
880 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 879 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
881 }; 880 };
882 881
883 } // namespace cc 882 } // namespace cc
884 883
885 #endif // CC_LAYERS_LAYER_IMPL_H_ 884 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698