Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ | 5 #ifndef SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ |
| 6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ | 6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "skia/ext/platform_device.h" | 10 #include "skia/ext/platform_device.h" |
| 11 | 11 |
| 12 namespace skia { | 12 namespace skia { |
| 13 | 13 |
| 14 class ScopedPlatformPaint; | 14 class ScopedPlatformPaint; |
| 15 | 15 |
| 16 // A device is basically a wrapper around SkBitmap that provides a surface for | 16 // A device is basically a wrapper around SkBitmap that provides a surface for |
| 17 // SkCanvas to draw into. Our device provides a surface Windows can also write | 17 // SkCanvas to draw into. Our device provides a surface Windows can also write |
| 18 // to. BitmapPlatformDevice creates a bitmap using CreateDIBSection() in a | 18 // to. BitmapPlatformDevice creates a bitmap using CreateDIBSection() in a |
| 19 // format that Skia supports and can then use this to draw ClearType into, etc. | 19 // format that Skia supports and can then use this to draw ClearType into, etc. |
| 20 // This pixel data is provided to the bitmap that the device contains so that it | 20 // This pixel data is provided to the bitmap that the device contains so that it |
| 21 // can be shared. | 21 // can be shared. |
| 22 class SK_API BitmapPlatformDevice : public SkBitmapDevice, public PlatformDevice { | 22 class BitmapPlatformDevice : public SkBitmapDevice, public PlatformDevice { |
|
f(malita)
2016/08/30 17:53:15
It would be safer to leave this export alone also
| |
| 23 public: | 23 public: |
| 24 // Factory function. is_opaque should be set if the caller knows the bitmap | 24 // Factory function. is_opaque should be set if the caller knows the bitmap |
| 25 // will be completely opaque and allows some optimizations. | 25 // will be completely opaque and allows some optimizations. |
| 26 // | 26 // |
| 27 // The |shared_section| parameter is optional (pass NULL for default | 27 // The |shared_section| parameter is optional (pass NULL for default |
| 28 // behavior). If |shared_section| is non-null, then it must be a handle to a | 28 // behavior). If |shared_section| is non-null, then it must be a handle to a |
| 29 // file-mapping object returned by CreateFileMapping. See CreateDIBSection | 29 // file-mapping object returned by CreateFileMapping. See CreateDIBSection |
| 30 // for details. If |shared_section| is null, the bitmap backing store is not | 30 // for details. If |shared_section| is null, the bitmap backing store is not |
| 31 // initialized. | 31 // initialized. |
| 32 static BitmapPlatformDevice* Create(int width, int height, | 32 static BitmapPlatformDevice* Create(int width, int height, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 // when |hbitmap_| is NULL (will be a NOP). | 78 // when |hbitmap_| is NULL (will be a NOP). |
| 79 void LoadConfig(const SkMatrix& transform, const SkIRect& clip_bounds); | 79 void LoadConfig(const SkMatrix& transform, const SkIRect& clip_bounds); |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); | 81 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); |
| 82 friend class ScopedPlatformPaint; | 82 friend class ScopedPlatformPaint; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace skia | 85 } // namespace skia |
| 86 | 86 |
| 87 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ | 87 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ |
| OLD | NEW |