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

Unified Diff: webkit/common/cursors/webcursor_mac.mm

Issue 63153003: mac: Prepare for -Wunused-functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/interpolated_transform.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/common/cursors/webcursor_mac.mm
diff --git a/webkit/common/cursors/webcursor_mac.mm b/webkit/common/cursors/webcursor_mac.mm
index 0d7173302def28aff13d17fdf2c364f303264b65..6554f6720410ed97f3dcea3e2d137146270f0ede 100644
--- a/webkit/common/cursors/webcursor_mac.mm
+++ b/webkit/common/cursors/webcursor_mac.mm
@@ -138,39 +138,6 @@ NSCursor* GetCoreCursorWithFallback(CrCoreCursorType type,
return LoadCursor(resource_id, hotspot_x, hotspot_y);
}
-// TODO(avi): When Skia becomes default, fold this function into the remaining
-// caller, InitFromCursor().
-CGImageRef CreateCGImageFromCustomData(const std::vector<char>& custom_data,
- const gfx::Size& custom_size) {
- // If the data is missing, leave the backing transparent.
- void* data = NULL;
- if (!custom_data.empty()) {
- // This is safe since we're not going to draw into the context we're
- // creating.
- data = const_cast<char*>(&custom_data[0]);
- }
-
- // If the size is empty, use a 1x1 transparent image.
- gfx::Size size = custom_size;
- if (size.IsEmpty()) {
- size.SetSize(1, 1);
- data = NULL;
- }
-
- base::ScopedCFTypeRef<CGColorSpaceRef> cg_color(
- CGColorSpaceCreateDeviceRGB());
- // The settings here match SetCustomData() below; keep in sync.
- base::ScopedCFTypeRef<CGContextRef> context(CGBitmapContextCreate(
- data,
- size.width(),
- size.height(),
- 8,
- size.width() * 4,
- cg_color.get(),
- kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big));
- return CGBitmapContextCreateImage(context.get());
-}
-
NSCursor* CreateCustomCursor(const std::vector<char>& custom_data,
const gfx::Size& custom_size,
float custom_scale,
« no previous file with comments | « ui/gfx/interpolated_transform.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698