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

Unified Diff: content/renderer/compositor_bindings/web_blend_mode.h

Issue 470983004: Move blink<->cc bindings to cc/blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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: content/renderer/compositor_bindings/web_blend_mode.h
diff --git a/content/renderer/compositor_bindings/web_blend_mode.h b/content/renderer/compositor_bindings/web_blend_mode.h
deleted file mode 100644
index 6ab6adee98b05a54510798697332467e4b760edd..0000000000000000000000000000000000000000
--- a/content/renderer/compositor_bindings/web_blend_mode.h
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_
-#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_
-
-#include "third_party/WebKit/public/platform/WebBlendMode.h"
-
-namespace content {
-
-inline SkXfermode::Mode BlendModeToSkia(blink::WebBlendMode blend_mode) {
- switch (blend_mode) {
- case blink::WebBlendModeNormal:
- return SkXfermode::kSrcOver_Mode;
- case blink::WebBlendModeMultiply:
- return SkXfermode::kMultiply_Mode;
- case blink::WebBlendModeScreen:
- return SkXfermode::kScreen_Mode;
- case blink::WebBlendModeOverlay:
- return SkXfermode::kOverlay_Mode;
- case blink::WebBlendModeDarken:
- return SkXfermode::kDarken_Mode;
- case blink::WebBlendModeLighten:
- return SkXfermode::kLighten_Mode;
- case blink::WebBlendModeColorDodge:
- return SkXfermode::kColorDodge_Mode;
- case blink::WebBlendModeColorBurn:
- return SkXfermode::kColorBurn_Mode;
- case blink::WebBlendModeHardLight:
- return SkXfermode::kHardLight_Mode;
- case blink::WebBlendModeSoftLight:
- return SkXfermode::kSoftLight_Mode;
- case blink::WebBlendModeDifference:
- return SkXfermode::kDifference_Mode;
- case blink::WebBlendModeExclusion:
- return SkXfermode::kExclusion_Mode;
- case blink::WebBlendModeHue:
- return SkXfermode::kHue_Mode;
- case blink::WebBlendModeSaturation:
- return SkXfermode::kSaturation_Mode;
- case blink::WebBlendModeColor:
- return SkXfermode::kColor_Mode;
- case blink::WebBlendModeLuminosity:
- return SkXfermode::kLuminosity_Mode;
- }
- return SkXfermode::kSrcOver_Mode;
-}
-
-inline blink::WebBlendMode BlendModeFromSkia(SkXfermode::Mode blend_mode) {
- switch (blend_mode) {
- case SkXfermode::kSrcOver_Mode:
- return blink::WebBlendModeNormal;
- case SkXfermode::kMultiply_Mode:
- return blink::WebBlendModeMultiply;
- case SkXfermode::kScreen_Mode:
- return blink::WebBlendModeScreen;
- case SkXfermode::kOverlay_Mode:
- return blink::WebBlendModeOverlay;
- case SkXfermode::kDarken_Mode:
- return blink::WebBlendModeDarken;
- case SkXfermode::kLighten_Mode:
- return blink::WebBlendModeLighten;
- case SkXfermode::kColorDodge_Mode:
- return blink::WebBlendModeColorDodge;
- case SkXfermode::kColorBurn_Mode:
- return blink::WebBlendModeColorBurn;
- case SkXfermode::kHardLight_Mode:
- return blink::WebBlendModeHardLight;
- case SkXfermode::kSoftLight_Mode:
- return blink::WebBlendModeSoftLight;
- case SkXfermode::kDifference_Mode:
- return blink::WebBlendModeDifference;
- case SkXfermode::kExclusion_Mode:
- return blink::WebBlendModeExclusion;
- case SkXfermode::kHue_Mode:
- return blink::WebBlendModeHue;
- case SkXfermode::kSaturation_Mode:
- return blink::WebBlendModeSaturation;
- case SkXfermode::kColor_Mode:
- return blink::WebBlendModeColor;
- case SkXfermode::kLuminosity_Mode:
- return blink::WebBlendModeLuminosity;
-
- // these value are SkXfermodes, but no blend modes.
- case SkXfermode::kClear_Mode:
- case SkXfermode::kSrc_Mode:
- case SkXfermode::kDst_Mode:
- case SkXfermode::kDstOver_Mode:
- case SkXfermode::kSrcIn_Mode:
- case SkXfermode::kDstIn_Mode:
- case SkXfermode::kSrcOut_Mode:
- case SkXfermode::kDstOut_Mode:
- case SkXfermode::kSrcATop_Mode:
- case SkXfermode::kDstATop_Mode:
- case SkXfermode::kXor_Mode:
- case SkXfermode::kPlus_Mode:
- case SkXfermode::kModulate_Mode:
- NOTREACHED();
- }
- return blink::WebBlendModeNormal;
-}
-
-} // namespace content
-
-#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_
-

Powered by Google App Engine
This is Rietveld 408576698