| 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 #ifndef SKIA_BITMAP_PLATFORM_DEVICE_WIN_H_ | 5 #ifndef SKIA_BITMAP_PLATFORM_DEVICE_WIN_H_ |
| 6 #define SKIA_BITMAP_PLATFORM_DEVICE_WIN_H_ | 6 #define SKIA_BITMAP_PLATFORM_DEVICE_WIN_H_ |
| 7 | 7 |
| 8 #include "skia/ext/platform_device_win.h" | 8 #include "skia/ext/platform_device_win.h" |
| 9 | 9 |
| 10 namespace skia { | 10 namespace skia { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 virtual HDC getBitmapDC(); | 60 virtual HDC getBitmapDC(); |
| 61 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region); | 61 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region); |
| 62 | 62 |
| 63 virtual void drawToHDC(HDC dc, int x, int y, const RECT* src_rect); | 63 virtual void drawToHDC(HDC dc, int x, int y, const RECT* src_rect); |
| 64 virtual void prepareForGDI(int x, int y, int width, int height); | 64 virtual void prepareForGDI(int x, int y, int width, int height); |
| 65 virtual void postProcessGDI(int x, int y, int width, int height); | 65 virtual void postProcessGDI(int x, int y, int width, int height); |
| 66 virtual void makeOpaque(int x, int y, int width, int height); | 66 virtual void makeOpaque(int x, int y, int width, int height); |
| 67 virtual void fixupAlphaBeforeCompositing(); | 67 virtual void fixupAlphaBeforeCompositing(); |
| 68 virtual bool IsVectorial() { return false; } | 68 virtual bool IsVectorial() { return false; } |
| 69 | 69 |
| 70 // Replaces occurrences of kMagicTransparencyColor with black. See |
| 71 // fixupAlphaBeforeCompositing()'s documentation in platform_device_win.h for |
| 72 // an explanation of why this is needed. |
| 73 static void fixupAlpha(SkBitmap& bitmap); |
| 74 |
| 70 // Returns the color value at the specified location. This does not | 75 // Returns the color value at the specified location. This does not |
| 71 // consider any transforms that may be set on the device. | 76 // consider any transforms that may be set on the device. |
| 72 SkColor getColorAt(int x, int y); | 77 SkColor getColorAt(int x, int y); |
| 73 | 78 |
| 74 protected: | 79 protected: |
| 75 // Flushes the Windows device context so that the pixel data can be accessed | 80 // Flushes the Windows device context so that the pixel data can be accessed |
| 76 // directly by Skia. Overridden from SkDevice, this is called when Skia | 81 // directly by Skia. Overridden from SkDevice, this is called when Skia |
| 77 // starts accessing pixel data. | 82 // starts accessing pixel data. |
| 78 virtual void onAccessBitmap(SkBitmap* bitmap); | 83 virtual void onAccessBitmap(SkBitmap* bitmap); |
| 79 | 84 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 102 | 107 |
| 103 // Data associated with this device, guaranteed non-null. We hold a reference | 108 // Data associated with this device, guaranteed non-null. We hold a reference |
| 104 // to this object. | 109 // to this object. |
| 105 BitmapPlatformDeviceWinData* data_; | 110 BitmapPlatformDeviceWinData* data_; |
| 106 }; | 111 }; |
| 107 | 112 |
| 108 } // namespace skia | 113 } // namespace skia |
| 109 | 114 |
| 110 #endif // SKIA_BITMAP_PLATFORM_DEVICE_WIN_H_ | 115 #endif // SKIA_BITMAP_PLATFORM_DEVICE_WIN_H_ |
| 111 | 116 |
| OLD | NEW |