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

Unified Diff: ui/gfx/image/image_skia_operations.h

Issue 10704113: Make tab/tabstrip high density compatible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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/base/ui_base_switches.cc ('k') | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia_operations.h
diff --git a/ui/gfx/image/image_skia_operations.h b/ui/gfx/image/image_skia_operations.h
new file mode 100644
index 0000000000000000000000000000000000000000..24a5b598ff8118bad514231105c84a60dbeaa06f
--- /dev/null
+++ b/ui/gfx/image/image_skia_operations.h
@@ -0,0 +1,43 @@
+// Copyright (c) 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.
+
+#ifndef UI_GFX_IMAGESKIA_OPERATIONS_H_
+#define UI_GFX_IMAGESKIA_OPERATIONS_H_
+#pragma once
+
+#include "base/gtest_prod_util.h"
+#include "ui/base/ui_export.h"
+
+namespace gfx {
+class ImageSkia;
+
+class UI_EXPORT ImageSkiaOperations {
+ public:
+ // Create an image that is a blend of two others. The alpha argument
+ // specifies the opacity of the second imag. The provided image must
+ // use the kARGB_8888_Config config and be of equal dimensions.
+ static ImageSkia CreateBlendedImage(const ImageSkia& first,
+ const ImageSkia& second,
+ double alpha);
+
+ // Create an image that is the original image masked out by the mask defined
+ // in the alpha image. The images must use the kARGB_8888_Config config and
+ // be of equal dimensions.
+ static ImageSkia CreateMaskedImage(const ImageSkia& first,
+ const ImageSkia& alpha);
+
+ // Create an image that is cropped from another image. This is special
+ // because it tiles the original image, so your coordinates can extend
+ // outside the bounds of the original image.
+ static ImageSkia CreateTiledImage(const ImageSkia& image,
+ int src_x, int src_y,
+ int dst_w, int dst_h);
+
+ private:
+ ImageSkiaOperations(); // Class for scoping only.
+};
+
+}
+
+#endif // UI_GFX_IMAGESKIA_OPERATIONS_H_
« no previous file with comments | « ui/base/ui_base_switches.cc ('k') | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698