| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/painted_scrollbar_layer.h" | 5 #include "cc/layers/painted_scrollbar_layer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/trace_event/trace_event.h" | |
| 11 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| 12 #include "cc/layers/painted_scrollbar_layer_impl.h" | 11 #include "cc/layers/painted_scrollbar_layer_impl.h" |
| 13 #include "cc/resources/ui_resource_bitmap.h" | 12 #include "cc/resources/ui_resource_bitmap.h" |
| 14 #include "cc/trees/draw_property_utils.h" | 13 #include "cc/trees/draw_property_utils.h" |
| 15 #include "cc/trees/layer_tree_host.h" | 14 #include "cc/trees/layer_tree_host.h" |
| 16 #include "cc/trees/layer_tree_impl.h" | 15 #include "cc/trees/layer_tree_impl.h" |
| 17 #include "skia/ext/platform_canvas.h" | 16 #include "skia/ext/platform_canvas.h" |
| 18 #include "skia/ext/refptr.h" | 17 #include "skia/ext/refptr.h" |
| 19 #include "third_party/skia/include/core/SkBitmap.h" | 18 #include "third_party/skia/include/core/SkBitmap.h" |
| 20 #include "third_party/skia/include/core/SkCanvas.h" | 19 #include "third_party/skia/include/core/SkCanvas.h" |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 301 |
| 303 scrollbar_->PaintPart(&skcanvas, part, layer_rect); | 302 scrollbar_->PaintPart(&skcanvas, part, layer_rect); |
| 304 // Make sure that the pixels are no longer mutable to unavoid unnecessary | 303 // Make sure that the pixels are no longer mutable to unavoid unnecessary |
| 305 // allocation and copying. | 304 // allocation and copying. |
| 306 skbitmap.setImmutable(); | 305 skbitmap.setImmutable(); |
| 307 | 306 |
| 308 return UIResourceBitmap(skbitmap); | 307 return UIResourceBitmap(skbitmap); |
| 309 } | 308 } |
| 310 | 309 |
| 311 } // namespace cc | 310 } // namespace cc |
| OLD | NEW |