OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "cc/layers/heads_up_display_layer_impl.h" | 5 #include "cc/layers/heads_up_display_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 fill_color = DebugColors::WheelEventHandlerRectFillColor(); | 645 fill_color = DebugColors::WheelEventHandlerRectFillColor(); |
646 stroke_width = DebugColors::WheelEventHandlerRectBorderWidth(); | 646 stroke_width = DebugColors::WheelEventHandlerRectBorderWidth(); |
647 label_text = "mousewheel event listener"; | 647 label_text = "mousewheel event listener"; |
648 break; | 648 break; |
649 case NON_FAST_SCROLLABLE_RECT_TYPE: | 649 case NON_FAST_SCROLLABLE_RECT_TYPE: |
650 stroke_color = DebugColors::NonFastScrollableRectBorderColor(); | 650 stroke_color = DebugColors::NonFastScrollableRectBorderColor(); |
651 fill_color = DebugColors::NonFastScrollableRectFillColor(); | 651 fill_color = DebugColors::NonFastScrollableRectFillColor(); |
652 stroke_width = DebugColors::NonFastScrollableRectBorderWidth(); | 652 stroke_width = DebugColors::NonFastScrollableRectBorderWidth(); |
653 label_text = "repaints on scroll"; | 653 label_text = "repaints on scroll"; |
654 break; | 654 break; |
| 655 case ANIMATION_BOUNDS_RECT_TYPE: |
| 656 stroke_color = DebugColors::LayerAnimationBoundsBorderColor(); |
| 657 fill_color = DebugColors::LayerAnimationBoundsFillColor(); |
| 658 stroke_width = DebugColors::LayerAnimationBoundsBorderWidth(); |
| 659 label_text = "animation bounds"; |
| 660 break; |
655 } | 661 } |
656 | 662 |
657 gfx::RectF debug_layer_rect = gfx::ScaleRect(debug_rects[i].rect, | 663 gfx::RectF debug_layer_rect = gfx::ScaleRect(debug_rects[i].rect, |
658 1.0 / contents_scale_x(), | 664 1.0 / contents_scale_x(), |
659 1.0 / contents_scale_y()); | 665 1.0 / contents_scale_y()); |
660 SkRect sk_rect = RectFToSkRect(debug_layer_rect); | 666 SkRect sk_rect = RectFToSkRect(debug_layer_rect); |
661 paint.setColor(fill_color); | 667 paint.setColor(fill_color); |
662 paint.setStyle(SkPaint::kFill_Style); | 668 paint.setStyle(SkPaint::kFill_Style); |
663 canvas->drawRect(sk_rect, paint); | 669 canvas->drawRect(sk_rect, paint); |
664 | 670 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 canvas->restore(); | 703 canvas->restore(); |
698 } | 704 } |
699 } | 705 } |
700 } | 706 } |
701 | 707 |
702 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { | 708 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { |
703 return "cc::HeadsUpDisplayLayerImpl"; | 709 return "cc::HeadsUpDisplayLayerImpl"; |
704 } | 710 } |
705 | 711 |
706 } // namespace cc | 712 } // namespace cc |
OLD | NEW |