Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(905)

Side by Side Diff: skia/ext/bitmap_platform_device_win.cc

Issue 2509983004: Revert "Change call-sites now that SkCanvas is not ref-counted" (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « skia/ext/bitmap_platform_device_skia.cc ('k') | skia/ext/platform_canvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 std::unique_ptr<SkCanvas> CreatePlatformCanvas(int width, 210 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
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_skia.cc ('k') | skia/ext/platform_canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698