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

Unified Diff: ui/gfx/skia_util.cc

Issue 10386020: Revert r135533. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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/skia_util.h ('k') | ui/resources/ui_resources_2x.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skia_util.cc
diff --git a/ui/gfx/skia_util.cc b/ui/gfx/skia_util.cc
index a459cddf944ca5de42579f2ce993a0209c794244..bfee3789f24df275ffe52d0b42b11b29196a3b1d 100644
--- a/ui/gfx/skia_util.cc
+++ b/ui/gfx/skia_util.cc
@@ -8,7 +8,6 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColorPriv.h"
#include "third_party/skia/include/core/SkShader.h"
-#include "third_party/skia/include/core/SkUnPreMultiply.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/gfx/rect.h"
@@ -102,28 +101,4 @@ string16 RemoveAcceleratorChar(const string16& s,
return accelerator_removed;
}
-void ConvertSkiaToRGBA(const unsigned char* skia,
- int pixel_width,
- unsigned char* rgba) {
- int total_length = pixel_width * 4;
- for (int i = 0; i < total_length; i += 4) {
- const uint32_t pixel_in = *reinterpret_cast<const uint32_t*>(&skia[i]);
-
- // Pack the components here.
- int alpha = SkGetPackedA32(pixel_in);
- if (alpha != 0 && alpha != 255) {
- SkColor unmultiplied = SkUnPreMultiply::PMColorToColor(pixel_in);
- rgba[i + 0] = SkColorGetR(unmultiplied);
- rgba[i + 1] = SkColorGetG(unmultiplied);
- rgba[i + 2] = SkColorGetB(unmultiplied);
- rgba[i + 3] = alpha;
- } else {
- rgba[i + 0] = SkGetPackedR32(pixel_in);
- rgba[i + 1] = SkGetPackedG32(pixel_in);
- rgba[i + 2] = SkGetPackedB32(pixel_in);
- rgba[i + 3] = alpha;
- }
- }
-}
-
} // namespace gfx
« no previous file with comments | « ui/gfx/skia_util.h ('k') | ui/resources/ui_resources_2x.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698