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 "lazy_pixel_ref_utils.h" | 5 #include "skia/ext/lazy_pixel_ref_utils.h" |
6 | 6 |
7 #include "SkCanvas.h" | 7 #include "skia/ext/lazy_pixel_ref.h" |
8 #include "SkData.h" | 8 #include "third_party/skia/include/core/SkCanvas.h" |
9 #include "SkDevice.h" | 9 #include "third_party/skia/include/core/SkData.h" |
10 #include "SkDraw.h" | 10 #include "third_party/skia/include/core/SkDevice.h" |
11 #include "SkPixelRef.h" | 11 #include "third_party/skia/include/core/SkDraw.h" |
12 #include "SkRRect.h" | 12 #include "third_party/skia/include/core/SkPixelRef.h" |
13 #include "SkRasterClip.h" | 13 #include "third_party/skia/include/core/SkRRect.h" |
14 #include "SkRect.h" | 14 #include "third_party/skia/include/core/SkRect.h" |
15 #include "SkShader.h" | 15 #include "third_party/skia/include/core/SkShader.h" |
16 | 16 #include "third_party/skia/src/core/SkRasterClip.h" |
17 #include "lazy_pixel_ref.h" | |
18 | 17 |
19 namespace skia { | 18 namespace skia { |
20 | 19 |
21 namespace { | 20 namespace { |
22 | 21 |
23 // URI label for a lazily decoded SkPixelRef. | 22 // URI label for a lazily decoded SkPixelRef. |
24 const char kLabelLazyDecoded[] = "lazy"; | 23 const char kLabelLazyDecoded[] = "lazy"; |
25 | 24 |
26 class LazyPixelRefSet { | 25 class LazyPixelRefSet { |
27 public: | 26 public: |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 GatherPixelRefDevice device(empty_bitmap, &pixel_ref_set); | 400 GatherPixelRefDevice device(empty_bitmap, &pixel_ref_set); |
402 NoSaveLayerCanvas canvas(&device); | 401 NoSaveLayerCanvas canvas(&device); |
403 | 402 |
404 canvas.clipRect(SkRect::MakeWH(picture->width(), picture->height()), | 403 canvas.clipRect(SkRect::MakeWH(picture->width(), picture->height()), |
405 SkRegion::kIntersect_Op, | 404 SkRegion::kIntersect_Op, |
406 false); | 405 false); |
407 canvas.drawPicture(*picture); | 406 canvas.drawPicture(*picture); |
408 } | 407 } |
409 | 408 |
410 } // namespace skia | 409 } // namespace skia |
OLD | NEW |