| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "skia/ext/bitmap_platform_device_mac.h" | 5 #include "skia/ext/bitmap_platform_device_mac.h" |
| 6 | 6 |
| 7 #import <ApplicationServices/ApplicationServices.h> | 7 #import <ApplicationServices/ApplicationServices.h> |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 8 #include <time.h> | 10 #include <time.h> |
| 9 | 11 |
| 10 #include "base/mac/mac_util.h" | 12 #include "base/mac/mac_util.h" |
| 11 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 12 #include "skia/ext/bitmap_platform_device.h" | 14 #include "skia/ext/bitmap_platform_device.h" |
| 13 #include "skia/ext/platform_canvas.h" | 15 #include "skia/ext/platform_canvas.h" |
| 14 #include "skia/ext/skia_utils_mac.h" | 16 #include "skia/ext/skia_utils_mac.h" |
| 15 #include "third_party/skia/include/core/SkMatrix.h" | 17 #include "third_party/skia/include/core/SkMatrix.h" |
| 16 #include "third_party/skia/include/core/SkPath.h" | 18 #include "third_party/skia/include/core/SkPath.h" |
| 17 #include "third_party/skia/include/core/SkRegion.h" | 19 #include "third_party/skia/include/core/SkRegion.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 } | 294 } |
| 293 | 295 |
| 294 SkCanvas* CreatePlatformCanvas(int width, int height, bool is_opaque, | 296 SkCanvas* CreatePlatformCanvas(int width, int height, bool is_opaque, |
| 295 uint8_t* data, OnFailureType failureType) { | 297 uint8_t* data, OnFailureType failureType) { |
| 296 skia::RefPtr<SkBaseDevice> dev = skia::AdoptRef( | 298 skia::RefPtr<SkBaseDevice> dev = skia::AdoptRef( |
| 297 BitmapPlatformDevice::CreateWithData(data, width, height, is_opaque)); | 299 BitmapPlatformDevice::CreateWithData(data, width, height, is_opaque)); |
| 298 return CreateCanvas(dev, failureType); | 300 return CreateCanvas(dev, failureType); |
| 299 } | 301 } |
| 300 | 302 |
| 301 } // namespace skia | 303 } // namespace skia |
| OLD | NEW |