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 <windows.h> | 5 #include <windows.h> |
6 #include <psapi.h> | 6 #include <psapi.h> |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/debug/gdi_debug_util_win.h" | 9 #include "base/debug/gdi_debug_util_win.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const CreateInfo& cinfo, | 200 SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const CreateInfo& cinfo, |
201 const SkPaint*) { | 201 const SkPaint*) { |
202 const SkImageInfo& info = cinfo.fInfo; | 202 const SkImageInfo& info = cinfo.fInfo; |
203 const bool do_clear = !info.isOpaque(); | 203 const bool do_clear = !info.isOpaque(); |
204 SkASSERT(info.colorType() == kN32_SkColorType); | 204 SkASSERT(info.colorType() == kN32_SkColorType); |
205 return Create(info.width(), info.height(), info.isOpaque(), NULL, do_clear); | 205 return Create(info.width(), info.height(), info.isOpaque(), NULL, do_clear); |
206 } | 206 } |
207 | 207 |
208 // PlatformCanvas impl | 208 // PlatformCanvas impl |
209 | 209 |
210 SkCanvas* CreatePlatformCanvas(int width, | 210 std::unique_ptr<SkCanvas> CreatePlatformCanvas(int width, |
211 int height, | 211 int height, |
212 bool is_opaque, | 212 bool is_opaque, |
213 HANDLE shared_section, | 213 HANDLE shared_section, |
214 OnFailureType failureType) { | 214 OnFailureType failureType) { |
215 sk_sp<SkBaseDevice> dev( | 215 sk_sp<SkBaseDevice> dev( |
216 BitmapPlatformDevice::Create(width, height, is_opaque, shared_section)); | 216 BitmapPlatformDevice::Create(width, height, is_opaque, shared_section)); |
217 return CreateCanvas(dev, failureType); | 217 return CreateCanvas(dev, failureType); |
218 } | 218 } |
219 | 219 |
220 } // namespace skia | 220 } // namespace skia |
OLD | NEW |