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

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

Issue 9346023: Skia DEPS roll to 3147 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: synced to r121242 Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « skia/ext/bitmap_platform_device_mac.cc ('k') | skia/ext/bitmap_platform_device_win.cc » ('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) 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 #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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // Loads the given transform and clipping region into the HDC. This is 56 // Loads the given transform and clipping region into the HDC. This is
57 // overridden from SkDevice. 57 // overridden from SkDevice.
58 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, 58 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region,
59 const SkClipStack&) OVERRIDE; 59 const SkClipStack&) OVERRIDE;
60 60
61 protected: 61 protected:
62 // Flushes the Windows device context so that the pixel data can be accessed 62 // Flushes the Windows device context so that the pixel data can be accessed
63 // directly by Skia. Overridden from SkDevice, this is called when Skia 63 // directly by Skia. Overridden from SkDevice, this is called when Skia
64 // starts accessing pixel data. 64 // starts accessing pixel data.
65 virtual void onAccessBitmap(SkBitmap* bitmap) OVERRIDE; 65 virtual const SkBitmap& onAccessBitmap(SkBitmap* bitmap) OVERRIDE;
66 66
67 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config, int width, 67 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config, int width,
68 int height, bool isOpaque, 68 int height, bool isOpaque,
69 Usage usage) OVERRIDE; 69 Usage usage) OVERRIDE;
70 70
71 private: 71 private:
72 // Reference counted data that can be shared between multiple devices. This 72 // Reference counted data that can be shared between multiple devices. This
73 // allows copy constructors and operator= for devices to work properly. The 73 // allows copy constructors and operator= for devices to work properly. The
74 // bitmaps used by the base device class are already refcounted and copyable. 74 // bitmaps used by the base device class are already refcounted and copyable.
75 class BitmapPlatformDeviceData; 75 class BitmapPlatformDeviceData;
76 76
77 // Private constructor. The data should already be ref'ed for us. 77 // Private constructor. The data should already be ref'ed for us.
78 BitmapPlatformDevice(BitmapPlatformDeviceData* data, 78 BitmapPlatformDevice(BitmapPlatformDeviceData* data,
79 const SkBitmap& bitmap); 79 const SkBitmap& bitmap);
80 80
81 // Data associated with this device, guaranteed non-null. We hold a reference 81 // Data associated with this device, guaranteed non-null. We hold a reference
82 // to this object. 82 // to this object.
83 BitmapPlatformDeviceData* data_; 83 BitmapPlatformDeviceData* data_;
84 84
85 #ifdef SK_DEBUG 85 #ifdef SK_DEBUG
86 int begin_paint_count_; 86 int begin_paint_count_;
87 #endif 87 #endif
88 88
89 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); 89 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice);
90 }; 90 };
91 91
92 } // namespace skia 92 } // namespace skia
93 93
94 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ 94 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_mac.cc ('k') | skia/ext/bitmap_platform_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698