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

Unified Diff: third_party/WebKit/Source/platform/image-encoders/RGBAtoRGB.h

Issue 2576223002: NEON-ize RGBA to RGB code (Closed)
Patch Set: Copyright, fix Windows build. Created 4 years 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: third_party/WebKit/Source/platform/image-encoders/RGBAtoRGB.h
diff --git a/third_party/WebKit/Source/platform/image-encoders/RGBAtoRGB.h b/third_party/WebKit/Source/platform/image-encoders/RGBAtoRGB.h
new file mode 100644
index 0000000000000000000000000000000000000000..52bb1c1ae57e069d3905ae8c824fd64b31fa3688
--- /dev/null
+++ b/third_party/WebKit/Source/platform/image-encoders/RGBAtoRGB.h
@@ -0,0 +1,30 @@
+// Copyright 2016 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 RGBAtoRGB_h
+#define RGBAtoRGB_h
+
+// TODO(cavalcantii): use regular macro, see https://crbug.com/673067.
+#ifdef __ARM_NEON__
+#include <arm_neon.h>
+#define RGBAtoRGB RGBAtoRGBNeon
+#else
+#define RGBAtoRGB RGBAtoRGBScalar
+#endif
+
+#include "platform/PlatformExport.h"
+
+namespace blink {
+PLATFORM_EXPORT void RGBAtoRGBScalar(const unsigned char* pixels,
+ unsigned pixelCount,
+ unsigned char* output);
+#ifdef __ARM_NEON__
+PLATFORM_EXPORT void RGBAtoRGBNeon(const unsigned char* input,
+ const unsigned pixelCount,
+ unsigned char* output);
+#endif
+
+} // namespace blink
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698