OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/platform_canvas.h" | 5 #include "skia/ext/platform_canvas.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "skia/ext/bitmap_platform_device.h" | 8 #include "skia/ext/bitmap_platform_device.h" |
9 #include "skia/ext/platform_device.h" | 9 #include "skia/ext/platform_device.h" |
10 #include "third_party/skia/include/core/SkTypes.h" | 10 #include "third_party/skia/include/core/SkTypes.h" |
11 | 11 |
12 namespace skia { | 12 namespace skia { |
13 | 13 |
14 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque) { | 14 PlatformCanvas::PlatformCanvas(int width, int height, int flags) { |
15 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas", | 15 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas", |
16 "width", width, "height", height); | 16 "width", width, "height", height); |
17 if (!initialize(width, height, is_opaque)) | 17 if (!initialize(width, height, flags)) |
18 SK_CRASH(); | 18 SK_CRASH(); |
19 } | 19 } |
20 | 20 |
21 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque, | 21 PlatformCanvas::PlatformCanvas(int width, int height, int flags, |
22 uint8_t* data) { | 22 uint8_t* data) { |
23 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas", | 23 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas", |
24 "width", width, "height", height); | 24 "width", width, "height", height); |
25 if (!initialize(width, height, is_opaque, data)) | 25 if (!initialize(width, height, flags, data)) |
26 SK_CRASH(); | 26 SK_CRASH(); |
27 } | 27 } |
28 | 28 |
29 PlatformCanvas::~PlatformCanvas() { | 29 PlatformCanvas::~PlatformCanvas() { |
30 } | 30 } |
31 | 31 |
32 bool PlatformCanvas::initialize(int width, int height, bool is_opaque, | 32 bool PlatformCanvas::initialize(int width, int height, int flags, |
33 uint8_t* data) { | 33 uint8_t* data) { |
34 return initializeWithDevice(BitmapPlatformDevice::Create( | 34 return initializeWithDevice(BitmapPlatformDevice::Create( |
35 width, height, is_opaque, data)); | 35 width, height, flags, data)); |
36 } | 36 } |
37 | 37 |
38 } // namespace skia | 38 } // namespace skia |
OLD | NEW |