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

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
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..c7cc4fe536f08e7a724db74f29b5710daf4f05d4
--- /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 have the kARGB_8888_Config config and be of equal dimensions.
pkotwicz 2012/07/10 17:16:48 Nit: Get rid of 'have'
+ static ImageSkia CreateBlendedImage(const ImageSkia& first,
+ const ImageSkia& second,
+ double alpha);
+
+ // Create an image that is the original bitmap masked out by the mask defined
+ // in the alpha bitmap. The images must use the kARGB_8888_Config config and
+ // be of equal dimensions.
+ static ImageSkia CreateMaskedImage(const ImageSkia& first,
+ const ImageSkia& alpha);
+
+ // Create a bitmap that is cropped from another bitmap. This is special
pkotwicz 2012/07/10 17:16:48 Nit: bitmap->image
+ // because it tiles the original bitmap, so your coordinates can extend
+ // outside the bounds of the original image.
+ static ImageSkia CreateTiledImage(const ImageSkia& bitmap,
+ int src_x, int src_y,
+ int dst_w, int dst_h);
+
+ private:
+ ImageSkiaOperations(); // Class for scoping only.
+};
+
+}
+
+#endif // UI_GFX_IMAGESKIA_OPERATIONS_H_

Powered by Google App Engine
This is Rietveld 408576698