| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "skia/ext/pixel_ref_utils.h" | 5 #include "skia/ext/pixel_ref_utils.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "third_party/skia/include/core/SkBitmapDevice.h" | 9 #include "third_party/skia/include/core/SkBitmapDevice.h" |
| 10 #include "third_party/skia/include/core/SkCanvas.h" | 10 #include "third_party/skia/include/core/SkCanvas.h" |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 SkBitmap empty_bitmap; | 363 SkBitmap empty_bitmap; |
| 364 empty_bitmap.setConfig( | 364 empty_bitmap.setConfig( |
| 365 SkBitmap::kNo_Config, picture->width(), picture->height()); | 365 SkBitmap::kNo_Config, picture->width(), picture->height()); |
| 366 | 366 |
| 367 GatherPixelRefDevice device(empty_bitmap, &pixel_ref_set); | 367 GatherPixelRefDevice device(empty_bitmap, &pixel_ref_set); |
| 368 SkNoSaveLayerCanvas canvas(&device); | 368 SkNoSaveLayerCanvas canvas(&device); |
| 369 | 369 |
| 370 canvas.clipRect(SkRect::MakeWH(picture->width(), picture->height()), | 370 canvas.clipRect(SkRect::MakeWH(picture->width(), picture->height()), |
| 371 SkRegion::kIntersect_Op, | 371 SkRegion::kIntersect_Op, |
| 372 false); | 372 false); |
| 373 canvas.drawPicture(*picture); | 373 canvas.drawPicture(picture); |
| 374 } | 374 } |
| 375 | 375 |
| 376 } // namespace skia | 376 } // namespace skia |
| OLD | NEW |