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

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

Issue 1868003002: cc: Move RenderTarget Information to Effect Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // These invalidate the host's render surface layer list. The caller 351 // These invalidate the host's render surface layer list. The caller
352 // is responsible for calling set_needs_update_draw_properties on the tree 352 // is responsible for calling set_needs_update_draw_properties on the tree
353 // so that its list can be recreated. 353 // so that its list can be recreated.
354 void ClearRenderSurfaceLayerList(); 354 void ClearRenderSurfaceLayerList();
355 void SetHasRenderSurface(bool has_render_surface); 355 void SetHasRenderSurface(bool has_render_surface);
356 356
357 void SetForceRenderSurface(bool has_render_surface); 357 void SetForceRenderSurface(bool has_render_surface);
358 358
359 RenderSurfaceImpl* render_surface() const { return render_surface_.get(); } 359 RenderSurfaceImpl* render_surface() const { return render_surface_.get(); }
360 360
361 // The render surface which this layer draws into. This can be either owned by
362 // the same layer or an ancestor of this layer.
363 RenderSurfaceImpl* render_target();
364 const RenderSurfaceImpl* render_target() const;
365
361 DrawProperties& draw_properties() { return draw_properties_; } 366 DrawProperties& draw_properties() { return draw_properties_; }
362 const DrawProperties& draw_properties() const { return draw_properties_; } 367 const DrawProperties& draw_properties() const { return draw_properties_; }
363 368
364 gfx::Transform DrawTransform() const; 369 gfx::Transform DrawTransform() const;
365 gfx::Transform ScreenSpaceTransform() const; 370 gfx::Transform ScreenSpaceTransform() const;
366 PerformanceProperties<LayerImpl>& performance_properties() { 371 PerformanceProperties<LayerImpl>& performance_properties() {
367 return performance_properties_; 372 return performance_properties_;
368 } 373 }
369 374
370 // Setter for draw_properties_. 375 // Setter for draw_properties_.
(...skipping 11 matching lines...) Expand all
382 return draw_properties_.screen_space_transform_is_animating; 387 return draw_properties_.screen_space_transform_is_animating;
383 } 388 }
384 bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; } 389 bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; }
385 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; } 390 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; }
386 gfx::Rect drawable_content_rect() const { 391 gfx::Rect drawable_content_rect() const {
387 return draw_properties_.drawable_content_rect; 392 return draw_properties_.drawable_content_rect;
388 } 393 }
389 gfx::Rect visible_layer_rect() const { 394 gfx::Rect visible_layer_rect() const {
390 return draw_properties_.visible_layer_rect; 395 return draw_properties_.visible_layer_rect;
391 } 396 }
392 LayerImpl* render_target() {
393 DCHECK(!draw_properties_.render_target ||
394 draw_properties_.render_target->render_surface());
395 return draw_properties_.render_target;
396 }
397 const LayerImpl* render_target() const {
398 DCHECK(!draw_properties_.render_target ||
399 draw_properties_.render_target->render_surface());
400 return draw_properties_.render_target;
401 }
402
403 size_t num_unclipped_descendants() const { 397 size_t num_unclipped_descendants() const {
404 return draw_properties_.num_unclipped_descendants; 398 return draw_properties_.num_unclipped_descendants;
405 } 399 }
406 400
407 // The client should be responsible for setting bounds, content bounds and 401 // The client should be responsible for setting bounds, content bounds and
408 // contents scale to appropriate values. LayerImpl doesn't calculate any of 402 // contents scale to appropriate values. LayerImpl doesn't calculate any of
409 // them from the other values. 403 // them from the other values.
410 404
411 void SetBounds(const gfx::Size& bounds); 405 void SetBounds(const gfx::Size& bounds);
412 gfx::Size bounds() const; 406 gfx::Size bounds() const;
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 bool layer_or_descendant_is_drawn_; 760 bool layer_or_descendant_is_drawn_;
767 // If true, the layer or one of its descendants has a touch handler. 761 // If true, the layer or one of its descendants has a touch handler.
768 bool layer_or_descendant_has_touch_handler_; 762 bool layer_or_descendant_has_touch_handler_;
769 763
770 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 764 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
771 }; 765 };
772 766
773 } // namespace cc 767 } // namespace cc
774 768
775 #endif // CC_LAYERS_LAYER_IMPL_H_ 769 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698