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" |
11 #include "cc/debug/debug_colors.h" | 11 #include "cc/debug/debug_colors.h" |
12 #include "cc/debug/frame_rate_counter.h" | 12 #include "cc/debug/frame_rate_counter.h" |
13 #include "cc/debug/paint_time_counter.h" | 13 #include "cc/debug/paint_time_counter.h" |
14 #include "cc/debug/traced_value.h" | 14 #include "cc/debug/traced_value.h" |
15 #include "cc/output/renderer.h" | 15 #include "cc/output/renderer.h" |
16 #include "cc/quads/texture_draw_quad.h" | 16 #include "cc/quads/texture_draw_quad.h" |
17 #include "cc/resources/memory_history.h" | 17 #include "cc/resources/memory_history.h" |
18 #include "cc/trees/layer_tree_impl.h" | 18 #include "cc/trees/layer_tree_impl.h" |
19 #include "skia/ext/platform_canvas.h" | 19 #include "skia/ext/platform_canvas.h" |
20 #include "third_party/khronos/GLES2/gl2.h" | 20 #include "third_party/khronos/GLES2/gl2.h" |
21 #include "third_party/khronos/GLES2/gl2ext.h" | 21 #include "third_party/khronos/GLES2/gl2ext.h" |
22 #include "third_party/skia/include/core/SkBitmap.h" | 22 #include "third_party/skia/include/core/SkBitmap.h" |
23 #include "third_party/skia/include/core/SkPaint.h" | 23 #include "third_party/skia/include/core/SkPaint.h" |
24 #include "third_party/skia/include/core/SkTypeface.h" | 24 #include "third_party/skia/include/core/SkTypeface.h" |
25 #include "third_party/skia/include/effects/SkColorMatrixFilter.h" | 25 #include "third_party/skia/include/effects/SkColorMatrixFilter.h" |
26 #include "ui/gfx/point.h" | 26 #include "ui/gfx/geometry/point.h" |
27 #include "ui/gfx/size.h" | 27 #include "ui/gfx/size.h" |
28 | 28 |
29 namespace cc { | 29 namespace cc { |
30 | 30 |
31 static inline SkPaint CreatePaint() { | 31 static inline SkPaint CreatePaint() { |
32 SkPaint paint; | 32 SkPaint paint; |
33 #if (SK_R32_SHIFT || SK_B32_SHIFT != 16) | 33 #if (SK_R32_SHIFT || SK_B32_SHIFT != 16) |
34 // The SkCanvas is in RGBA but the shader is expecting BGRA, so we need to | 34 // The SkCanvas is in RGBA but the shader is expecting BGRA, so we need to |
35 // swizzle our colors when drawing to the SkCanvas. | 35 // swizzle our colors when drawing to the SkCanvas. |
36 SkColorMatrix swizzle_matrix; | 36 SkColorMatrix swizzle_matrix; |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { | 760 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { |
761 return "cc::HeadsUpDisplayLayerImpl"; | 761 return "cc::HeadsUpDisplayLayerImpl"; |
762 } | 762 } |
763 | 763 |
764 void HeadsUpDisplayLayerImpl::AsValueInto(base::DictionaryValue* dict) const { | 764 void HeadsUpDisplayLayerImpl::AsValueInto(base::DictionaryValue* dict) const { |
765 LayerImpl::AsValueInto(dict); | 765 LayerImpl::AsValueInto(dict); |
766 dict->SetString("layer_name", "Heads Up Display Layer"); | 766 dict->SetString("layer_name", "Heads Up Display Layer"); |
767 } | 767 } |
768 | 768 |
769 } // namespace cc | 769 } // namespace cc |
OLD | NEW |