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

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

Issue 1467403002: Move Windows DC-initialization to skia_utils_win.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-metafile-from-device
Patch Set: Rebase again Created 5 years 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 | « printing/printing_context_win.cc ('k') | skia/ext/platform_device.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 7
8 #include "base/debug/gdi_debug_util_win.h" 8 #include "base/debug/gdi_debug_util_win.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/win/win_util.h" 10 #include "base/win/win_util.h"
11 #include "skia/ext/bitmap_platform_device_win.h" 11 #include "skia/ext/bitmap_platform_device_win.h"
12 #include "skia/ext/platform_canvas.h" 12 #include "skia/ext/platform_canvas.h"
13 #include "skia/ext/skia_utils_win.h"
13 #include "third_party/skia/include/core/SkMatrix.h" 14 #include "third_party/skia/include/core/SkMatrix.h"
14 #include "third_party/skia/include/core/SkRefCnt.h" 15 #include "third_party/skia/include/core/SkRefCnt.h"
15 #include "third_party/skia/include/core/SkRegion.h" 16 #include "third_party/skia/include/core/SkRegion.h"
16 #include "third_party/skia/include/core/SkUtils.h" 17 #include "third_party/skia/include/core/SkUtils.h"
17 18
18 namespace { 19 namespace {
19 20
20 HBITMAP CreateHBitmap(int width, int height, bool is_opaque, 21 HBITMAP CreateHBitmap(int width, int height, bool is_opaque,
21 HANDLE shared_section, void** data) { 22 HANDLE shared_section, void** data) {
22 // CreateDIBSection appears to get unhappy if we create an empty bitmap, so 23 // CreateDIBSection appears to get unhappy if we create an empty bitmap, so
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 int height, 312 int height,
312 bool is_opaque, 313 bool is_opaque,
313 HANDLE shared_section, 314 HANDLE shared_section,
314 OnFailureType failureType) { 315 OnFailureType failureType) {
315 skia::RefPtr<SkBaseDevice> dev = skia::AdoptRef( 316 skia::RefPtr<SkBaseDevice> dev = skia::AdoptRef(
316 BitmapPlatformDevice::Create(width, height, is_opaque, shared_section)); 317 BitmapPlatformDevice::Create(width, height, is_opaque, shared_section));
317 return CreateCanvas(dev, failureType); 318 return CreateCanvas(dev, failureType);
318 } 319 }
319 320
320 } // namespace skia 321 } // namespace skia
OLDNEW
« no previous file with comments | « printing/printing_context_win.cc ('k') | skia/ext/platform_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698