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

Unified Diff: ui/gfx/image/image_skia_util_ios.mm

Issue 854713003: More old files deletion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix tryjobs? Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/image/image_skia_util_ios.h ('k') | ui/gfx/image/image_skia_util_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia_util_ios.mm
diff --git a/ui/gfx/image/image_skia_util_ios.mm b/ui/gfx/image/image_skia_util_ios.mm
deleted file mode 100644
index 77944eee4c2df1125898815d3275000c3432b2f7..0000000000000000000000000000000000000000
--- a/ui/gfx/image/image_skia_util_ios.mm
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2012 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 "ui/gfx/image/image_skia_util_ios.h"
-
-#include <UIKit/UIKit.h>
-
-#include "base/logging.h"
-#include "base/mac/scoped_cftyperef.h"
-#include "skia/ext/skia_utils_ios.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/gfx/image/image_skia.h"
-
-namespace gfx {
-
-gfx::ImageSkia ImageSkiaFromUIImage(UIImage* image) {
- gfx::ImageSkia image_skia;
- float max_scale = ImageSkia::GetSupportedScales().back();
- gfx::ImageSkiaRep image_skia_rep = ImageSkiaRepOfScaleFromUIImage(
- image, max_scale);
- if (!image_skia_rep.is_null())
- image_skia.AddRepresentation(image_skia_rep);
- return image_skia;
-}
-
-gfx::ImageSkiaRep ImageSkiaRepOfScaleFromUIImage(UIImage* image, float scale) {
- if (!image)
- return gfx::ImageSkiaRep();
-
- CGSize size = image.size;
- CGSize desired_size_for_scale =
- CGSizeMake(size.width * scale, size.height * scale);
- SkBitmap bitmap(gfx::CGImageToSkBitmap(image.CGImage,
- desired_size_for_scale,
- false));
- return gfx::ImageSkiaRep(bitmap, scale);
-}
-
-UIImage* UIImageFromImageSkia(const gfx::ImageSkia& image_skia) {
- return UIImageFromImageSkiaRep(
- image_skia.GetRepresentation(ImageSkia::GetSupportedScales().back()));
-}
-
-UIImage* UIImageFromImageSkiaRep(const gfx::ImageSkiaRep& image_skia_rep) {
- if (image_skia_rep.is_null())
- return nil;
-
- float scale = image_skia_rep.scale();
- base::ScopedCFTypeRef<CGColorSpaceRef> color_space(
- CGColorSpaceCreateDeviceRGB());
- return gfx::SkBitmapToUIImageWithColorSpace(image_skia_rep.sk_bitmap(), scale,
- color_space);
-}
-
-} // namespace gfx
« no previous file with comments | « ui/gfx/image/image_skia_util_ios.h ('k') | ui/gfx/image/image_skia_util_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698