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

Side by Side Diff: skia/ext/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_win.cc ('k') | skia/skia.gyp » ('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_PLATFORM_DEVICE_MAC_H_ 5 #ifndef SKIA_EXT_PLATFORM_DEVICE_MAC_H_
6 #define SKIA_EXT_PLATFORM_DEVICE_MAC_H_ 6 #define SKIA_EXT_PLATFORM_DEVICE_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #import <ApplicationServices/ApplicationServices.h> 9 #import <ApplicationServices/ApplicationServices.h>
10 #include "third_party/skia/include/core/SkDevice.h" 10 #include "third_party/skia/include/core/SkDevice.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const SkRegion& region, 53 const SkRegion& region,
54 const SkMatrix& transformation); 54 const SkMatrix& transformation);
55 55
56 protected: 56 protected:
57 // Forwards |bitmap| to SkDevice's constructor. 57 // Forwards |bitmap| to SkDevice's constructor.
58 PlatformDevice(const SkBitmap& bitmap); 58 PlatformDevice(const SkBitmap& bitmap);
59 59
60 // Loads the specified Skia transform into the device context 60 // Loads the specified Skia transform into the device context
61 static void LoadTransformToCGContext(CGContextRef context, 61 static void LoadTransformToCGContext(CGContextRef context,
62 const SkMatrix& matrix); 62 const SkMatrix& matrix);
63
64 // Function pointer used by the processPixels method for setting the alpha
65 // value of a particular pixel.
66 typedef void (*adjustAlpha)(uint32_t* pixel);
67
68 // Loops through each of the pixels in the specified range, invoking
69 // adjustor for the alpha value of each pixel.
70 virtual void processPixels(int x,
71 int y,
72 int width,
73 int height,
74 adjustAlpha adjustor) = 0;
75 }; 63 };
76 64
77 } // namespace skia 65 } // namespace skia
78 66
79 #endif // SKIA_EXT_PLATFORM_DEVICE_MAC_H_ 67 #endif // SKIA_EXT_PLATFORM_DEVICE_MAC_H_
80 68
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_win.cc ('k') | skia/skia.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698