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

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

Issue 7019013: Removal of dependencies on PlatformDevice classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Syncing merge conflicts. Created 9 years, 7 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 "skia/ext/platform_device_win.h" 9 #include "skia/ext/platform_device_win.h"
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // the resulting GDI clip rect will be random. 62 // the resulting GDI clip rect will be random.
63 // 63 //
64 // Copy constucting and "=" is designed for saving the device or passing it 64 // Copy constucting and "=" is designed for saving the device or passing it
65 // around to another routine willing to deal with the bitmap data directly. 65 // around to another routine willing to deal with the bitmap data directly.
66 BitmapPlatformDevice(const BitmapPlatformDevice& other); 66 BitmapPlatformDevice(const BitmapPlatformDevice& other);
67 virtual ~BitmapPlatformDevice(); 67 virtual ~BitmapPlatformDevice();
68 68
69 // See warning for copy constructor above. 69 // See warning for copy constructor above.
70 BitmapPlatformDevice& operator=(const BitmapPlatformDevice& other); 70 BitmapPlatformDevice& operator=(const BitmapPlatformDevice& other);
71 71
72 // PlatformDevice overrides
72 // Retrieves the bitmap DC, which is the memory DC for our bitmap data. The 73 // Retrieves the bitmap DC, which is the memory DC for our bitmap data. The
73 // bitmap DC is lazy created. 74 // bitmap DC is lazy created.
74 virtual PlatformSurface BeginPlatformPaint(); 75 virtual PlatformSurface BeginPlatformPaint();
75 virtual void EndPlatformPaint(); 76 virtual void EndPlatformPaint();
76 77
78 virtual void DrawToNativeContext(HDC dc, int x, int y, const RECT* src_rect);
79 virtual void MakeOpaque(int x, int y, int width, int height);
80 virtual bool IsVectorial() { return false; }
81
77 // Loads the given transform and clipping region into the HDC. This is 82 // Loads the given transform and clipping region into the HDC. This is
78 // overridden from SkDevice. 83 // overridden from SkDevice.
79 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, 84 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region,
80 const SkClipStack&); 85 const SkClipStack&);
81 86
82 virtual void drawToHDC(HDC dc, int x, int y, const RECT* src_rect);
83 virtual void makeOpaque(int x, int y, int width, int height);
84 virtual bool IsVectorial() { return false; }
85
86 // Returns the color value at the specified location. This does not
87 // consider any transforms that may be set on the device.
88 SkColor getColorAt(int x, int y);
89
90 protected: 87 protected:
91 // Flushes the Windows device context so that the pixel data can be accessed 88 // Flushes the Windows device context so that the pixel data can be accessed
92 // directly by Skia. Overridden from SkDevice, this is called when Skia 89 // directly by Skia. Overridden from SkDevice, this is called when Skia
93 // starts accessing pixel data. 90 // starts accessing pixel data.
94 virtual void onAccessBitmap(SkBitmap* bitmap); 91 virtual void onAccessBitmap(SkBitmap* bitmap);
95 92
96 // Override SkDevice. 93 // Override SkDevice.
97 virtual SkDeviceFactory* onNewDeviceFactory(); 94 virtual SkDeviceFactory* onNewDeviceFactory();
98 95
99 private: 96 private:
(...skipping 12 matching lines...) Expand all
112 109
113 #ifdef SK_DEBUG 110 #ifdef SK_DEBUG
114 int begin_paint_count_; 111 int begin_paint_count_;
115 #endif 112 #endif
116 }; 113 };
117 114
118 } // namespace skia 115 } // namespace skia
119 116
120 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_ 117 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_WIN_H_
121 118
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