OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include <windows.h> | |
6 #include <psapi.h> | |
7 | |
8 #include "base/debug/trace_event.h" | |
9 #include "skia/ext/bitmap_platform_device_win.h" | |
10 #include "skia/ext/platform_canvas.h" | |
11 | |
12 namespace skia { | |
13 | |
14 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque) { | |
15 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas", | |
16 "width", width, "height", height); | |
17 initialize(width, height, is_opaque, NULL); | |
18 } | |
19 | |
20 PlatformCanvas::PlatformCanvas(int width, | |
21 int height, | |
22 bool is_opaque, | |
23 HANDLE shared_section) { | |
24 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas", | |
25 "width", width, "height", height); | |
26 initialize(width, height, is_opaque, shared_section); | |
27 } | |
28 | |
29 PlatformCanvas::~PlatformCanvas() { | |
30 } | |
31 | |
32 bool PlatformCanvas::initialize(int width, | |
33 int height, | |
34 bool is_opaque, | |
35 HANDLE shared_section) { | |
36 return initializeWithDevice(BitmapPlatformDevice::Create( | |
37 width, height, is_opaque, shared_section)); | |
38 } | |
39 | |
40 } // namespace skia | |
OLD | NEW |