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

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

Issue 2616003003: Revert of Delete Mac & Cairo skia::BitmapPlatformDevice impls (Closed)
Patch Set: Created 3 years, 11 months 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 | « skia/ext/bitmap_platform_device_skia.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 #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 // A device is basically a wrapper around SkBitmap that provides a surface for 14 // A device is basically a wrapper around SkBitmap that provides a surface for
15 // SkCanvas to draw into. Our device provides a surface Windows can also write 15 // SkCanvas to draw into. Our device provides a surface Windows can also write
16 // to. BitmapPlatformDevice creates a bitmap using CreateDIBSection() in a 16 // to. BitmapPlatformDevice creates a bitmap using CreateDIBSection() in a
17 // format that Skia supports and can then use this to draw ClearType into, etc. 17 // format that Skia supports and can then use this to draw ClearType into, etc.
18 // This pixel data is provided to the bitmap that the device contains so that it 18 // This pixel data is provided to the bitmap that the device contains so that it
19 // can be shared. 19 // can be shared.
20 class SK_API BitmapPlatformDevice final : public SkBitmapDevice, 20 class SK_API BitmapPlatformDevice : public SkBitmapDevice,
21 public PlatformDevice { 21 public PlatformDevice {
22 public: 22 public:
23 // Factory function. is_opaque should be set if the caller knows the bitmap 23 // Factory function. is_opaque should be set if the caller knows the bitmap
24 // will be completely opaque and allows some optimizations. 24 // will be completely opaque and allows some optimizations.
25 // 25 //
26 // The |shared_section| parameter is optional (pass NULL for default 26 // The |shared_section| parameter is optional (pass NULL for default
27 // behavior). If |shared_section| is non-null, then it must be a handle to a 27 // behavior). If |shared_section| is non-null, then it must be a handle to a
28 // file-mapping object returned by CreateFileMapping. See CreateDIBSection 28 // file-mapping object returned by CreateFileMapping. See CreateDIBSection
29 // for details. If |shared_section| is null, the bitmap backing store is not 29 // for details. If |shared_section| is null, the bitmap backing store is not
30 // initialized. 30 // initialized.
31 static BitmapPlatformDevice* Create(int width, int height, 31 static BitmapPlatformDevice* Create(int width, int height,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Loads the current transform and clip into the context. Can be called even 71 // Loads the current transform and clip into the context. Can be called even
72 // when |hbitmap_| is NULL (will be a NOP). 72 // when |hbitmap_| is NULL (will be a NOP).
73 void LoadConfig(const SkMatrix& transform, const SkIRect& clip_bounds); 73 void LoadConfig(const SkMatrix& transform, const SkIRect& clip_bounds);
74 74
75 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); 75 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice);
76 }; 76 };
77 77
78 } // namespace skia 78 } // namespace skia
79 79
80 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ 80 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_skia.cc ('k') | skia/ext/platform_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698