| Index: chrome/browser/cocoa/cocoa_utils.mm
|
| diff --git a/chrome/browser/cocoa/cocoa_utils.mm b/chrome/browser/cocoa/cocoa_utils.mm
|
| deleted file mode 100644
|
| index 9c7584d187bcff4d24153465a63c7811c47e2165..0000000000000000000000000000000000000000
|
| --- a/chrome/browser/cocoa/cocoa_utils.mm
|
| +++ /dev/null
|
| @@ -1,38 +0,0 @@
|
| -// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#include <base/logging.h>
|
| -#include "chrome/browser/cocoa/cocoa_utils.h"
|
| -#import <QuartzCore/CIImage.h>
|
| -#include "third_party/skia/include/utils/mac/SkCGUtils.h"
|
| -#include "third_party/skia/include/core/SkColorPriv.h"
|
| -
|
| -namespace {
|
| -
|
| -// Callback passed to CGDataProviderCreateWithData()
|
| -void ReleaseData(void* info, const void* pixelData, size_t size) {
|
| - // info is a non-const pixelData
|
| - if (info)
|
| - free(info);
|
| -}
|
| -
|
| -}
|
| -
|
| -namespace CocoaUtils {
|
| -
|
| -NSImage* SkBitmapToNSImage(const SkBitmap& skiaBitmap) {
|
| - // First convert SkBitmap to CGImageRef.
|
| - CGImageRef cgimage = SkCreateCGImageRef(skiaBitmap);
|
| -
|
| - // Now convert to NSImage.
|
| - NSBitmapImageRep* bitmap = [[[NSBitmapImageRep alloc]
|
| - initWithCGImage:cgimage] autorelease];
|
| - CFRelease(cgimage);
|
| - NSImage* image = [[[NSImage alloc] init] autorelease];
|
| - [image addRepresentation:bitmap];
|
| - return image;
|
| -}
|
| -
|
| -} // namespace CocoaUtils
|
| -
|
|
|