OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/gfx/bitmap_platform_device_linux.h" | 5 #include "base/gfx/bitmap_platform_device_linux.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 #include <time.h> | 9 #include <time.h> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 // The device object will take ownership of the graphics context. | 31 // The device object will take ownership of the graphics context. |
32 return new BitmapPlatformDeviceLinux(bitmap); | 32 return new BitmapPlatformDeviceLinux(bitmap); |
33 } | 33 } |
34 | 34 |
35 // The device will own the bitmap, which corresponds to also owning the pixel | 35 // The device will own the bitmap, which corresponds to also owning the pixel |
36 // data. Therefore, we do not transfer ownership to the SkDevice's bitmap. | 36 // data. Therefore, we do not transfer ownership to the SkDevice's bitmap. |
37 BitmapPlatformDeviceLinux::BitmapPlatformDeviceLinux(const SkBitmap& bitmap) | 37 BitmapPlatformDeviceLinux::BitmapPlatformDeviceLinux(const SkBitmap& bitmap) |
38 : PlatformDeviceLinux(bitmap) { | 38 : PlatformDeviceLinux(bitmap) { |
39 } | 39 } |
40 | 40 |
| 41 BitmapPlatformDeviceLinux::BitmapPlatformDeviceLinux( |
| 42 const BitmapPlatformDeviceLinux& other) |
| 43 : PlatformDeviceLinux( |
| 44 const_cast<BitmapPlatformDeviceLinux&>(other).accessBitmap(true)) { |
| 45 } |
| 46 |
41 BitmapPlatformDeviceLinux::~BitmapPlatformDeviceLinux() { | 47 BitmapPlatformDeviceLinux::~BitmapPlatformDeviceLinux() { |
42 } | 48 } |
43 | 49 |
44 } // namespace gfx | 50 } // namespace gfx |
OLD | NEW |