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

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

Issue 3227007: Move BitmapPlatformDevice::makeOpaque into a shared file (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 3 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_linux.h ('k') | skia/ext/bitmap_platform_device_mac.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) 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_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ 5 #ifndef SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_
6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ 6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #include "skia/ext/platform_device_mac.h" 9 #include "skia/ext/platform_device_mac.h"
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 virtual ~BitmapPlatformDevice(); 51 virtual ~BitmapPlatformDevice();
52 52
53 // See warning for copy constructor above. 53 // See warning for copy constructor above.
54 BitmapPlatformDevice& operator=(const BitmapPlatformDevice& other); 54 BitmapPlatformDevice& operator=(const BitmapPlatformDevice& other);
55 55
56 virtual CGContextRef GetBitmapContext(); 56 virtual CGContextRef GetBitmapContext();
57 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region); 57 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region);
58 58
59 virtual void DrawToContext(CGContextRef context, int x, int y, 59 virtual void DrawToContext(CGContextRef context, int x, int y,
60 const CGRect* src_rect); 60 const CGRect* src_rect);
61 virtual void makeOpaque(int x, int y, int width, int height);
61 virtual bool IsVectorial() { return false; } 62 virtual bool IsVectorial() { return false; }
62 63
63 // Returns the color value at the specified location. This does not 64 // Returns the color value at the specified location. This does not
64 // consider any transforms that may be set on the device. 65 // consider any transforms that may be set on the device.
65 SkColor getColorAt(int x, int y); 66 SkColor getColorAt(int x, int y);
66 67
67 protected: 68 protected:
68 // Reference counted data that can be shared between multiple devices. This 69 // Reference counted data that can be shared between multiple devices. This
69 // allows copy constructors and operator= for devices to work properly. The 70 // allows copy constructors and operator= for devices to work properly. The
70 // bitmaps used by the base device class are already refcounted and copyable. 71 // bitmaps used by the base device class are already refcounted and copyable.
71 class BitmapPlatformDeviceData; 72 class BitmapPlatformDeviceData;
72 73
73 BitmapPlatformDevice(BitmapPlatformDeviceData* data, 74 BitmapPlatformDevice(BitmapPlatformDeviceData* data,
74 const SkBitmap& bitmap); 75 const SkBitmap& bitmap);
75 76
76 // Flushes the CoreGraphics context so that the pixel data can be accessed 77 // Flushes the CoreGraphics context so that the pixel data can be accessed
77 // directly by Skia. Overridden from SkDevice, this is called when Skia 78 // directly by Skia. Overridden from SkDevice, this is called when Skia
78 // starts accessing pixel data. 79 // starts accessing pixel data.
79 virtual void onAccessBitmap(SkBitmap*); 80 virtual void onAccessBitmap(SkBitmap*);
80 81
81 virtual void processPixels(int x, int y,
82 int width, int height,
83 adjustAlpha adjustor);
84
85 // Data associated with this device, guaranteed non-null. We hold a reference 82 // Data associated with this device, guaranteed non-null. We hold a reference
86 // to this object. 83 // to this object.
87 BitmapPlatformDeviceData* data_; 84 BitmapPlatformDeviceData* data_;
88 }; 85 };
89 86
90 } // namespace skia 87 } // namespace skia
91 88
92 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ 89 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_linux.h ('k') | skia/ext/bitmap_platform_device_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698