OLD | NEW |
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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "third_party/skia/include/core/SkImageFilter.h" | 32 #include "third_party/skia/include/core/SkImageFilter.h" |
33 #include "third_party/skia/include/core/SkPicture.h" | 33 #include "third_party/skia/include/core/SkPicture.h" |
34 #include "ui/gfx/point3_f.h" | 34 #include "ui/gfx/point3_f.h" |
35 #include "ui/gfx/rect.h" | 35 #include "ui/gfx/rect.h" |
36 #include "ui/gfx/rect_f.h" | 36 #include "ui/gfx/rect_f.h" |
37 #include "ui/gfx/transform.h" | 37 #include "ui/gfx/transform.h" |
38 | 38 |
39 namespace base { | 39 namespace base { |
40 namespace debug { | 40 namespace debug { |
41 class ConvertableToTraceFormat; | 41 class ConvertableToTraceFormat; |
42 class TracedValue; | |
43 } | 42 } |
44 | 43 |
45 class DictionaryValue; | 44 class DictionaryValue; |
46 } | 45 } |
47 | 46 |
48 namespace cc { | 47 namespace cc { |
49 | 48 |
50 class LayerTreeHostImpl; | 49 class LayerTreeHostImpl; |
51 class LayerTreeImpl; | 50 class LayerTreeImpl; |
52 class MicroBenchmarkImpl; | 51 class MicroBenchmarkImpl; |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 return scroll_clip_layer_ ? scroll_clip_layer_->bounds().height() : 0; | 514 return scroll_clip_layer_ ? scroll_clip_layer_->bounds().height() : 0; |
516 } | 515 } |
517 | 516 |
518 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; | 517 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; |
519 | 518 |
520 virtual skia::RefPtr<SkPicture> GetPicture(); | 519 virtual skia::RefPtr<SkPicture> GetPicture(); |
521 | 520 |
522 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); | 521 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); |
523 virtual void PushPropertiesTo(LayerImpl* layer); | 522 virtual void PushPropertiesTo(LayerImpl* layer); |
524 | 523 |
525 virtual void AsValueInto(base::debug::TracedValue* dict) const; | 524 scoped_ptr<base::Value> AsValue() const; |
526 | |
527 virtual size_t GPUMemoryUsageInBytes() const; | 525 virtual size_t GPUMemoryUsageInBytes() const; |
528 | 526 |
529 void SetNeedsPushProperties(); | 527 void SetNeedsPushProperties(); |
530 void AddDependentNeedsPushProperties(); | 528 void AddDependentNeedsPushProperties(); |
531 void RemoveDependentNeedsPushProperties(); | 529 void RemoveDependentNeedsPushProperties(); |
532 bool parent_should_know_need_push_properties() const { | 530 bool parent_should_know_need_push_properties() const { |
533 return needs_push_properties() || descendant_needs_push_properties(); | 531 return needs_push_properties() || descendant_needs_push_properties(); |
534 } | 532 } |
535 | 533 |
536 bool needs_push_properties() const { return needs_push_properties_; } | 534 bool needs_push_properties() const { return needs_push_properties_; } |
(...skipping 21 matching lines...) Expand all Loading... |
558 const gfx::Size& content_bounds, | 556 const gfx::Size& content_bounds, |
559 const SharedQuadState* shared_quad_state, | 557 const SharedQuadState* shared_quad_state, |
560 AppendQuadsData* append_quads_data) const; | 558 AppendQuadsData* append_quads_data) const; |
561 void AppendDebugBorderQuad(RenderPass* render_pass, | 559 void AppendDebugBorderQuad(RenderPass* render_pass, |
562 const gfx::Size& content_bounds, | 560 const gfx::Size& content_bounds, |
563 const SharedQuadState* shared_quad_state, | 561 const SharedQuadState* shared_quad_state, |
564 AppendQuadsData* append_quads_data, | 562 AppendQuadsData* append_quads_data, |
565 SkColor color, | 563 SkColor color, |
566 float width) const; | 564 float width) const; |
567 | 565 |
| 566 virtual void AsValueInto(base::DictionaryValue* dict) const; |
| 567 |
568 void NoteLayerPropertyChanged(); | 568 void NoteLayerPropertyChanged(); |
569 void NoteLayerPropertyChangedForSubtree(); | 569 void NoteLayerPropertyChangedForSubtree(); |
570 | 570 |
571 // Note carefully this does not affect the current layer. | 571 // Note carefully this does not affect the current layer. |
572 void NoteLayerPropertyChangedForDescendants(); | 572 void NoteLayerPropertyChangedForDescendants(); |
573 | 573 |
574 private: | 574 private: |
575 void NoteLayerPropertyChangedForDescendantsInternal(); | 575 void NoteLayerPropertyChangedForDescendantsInternal(); |
576 | 576 |
577 virtual const char* LayerTypeAsString() const; | 577 virtual const char* LayerTypeAsString() const; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 DrawProperties<LayerImpl> draw_properties_; | 700 DrawProperties<LayerImpl> draw_properties_; |
701 | 701 |
702 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 702 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
703 | 703 |
704 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 704 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
705 }; | 705 }; |
706 | 706 |
707 } // namespace cc | 707 } // namespace cc |
708 | 708 |
709 #endif // CC_LAYERS_LAYER_IMPL_H_ | 709 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |