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

Side by Side Diff: cc/blink/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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/blink/web_animation_unittest.cc ('k') | cc/blink/web_compositor_support_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ 5 #ifndef CC_BLINK_WEB_BLEND_MODE_H_
6 #define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ 6 #define CC_BLINK_WEB_BLEND_MODE_H_
7 7
8 #include "third_party/WebKit/public/platform/WebBlendMode.h" 8 #include "third_party/WebKit/public/platform/WebBlendMode.h"
9 #include "third_party/skia/include/core/SkXfermode.h"
9 10
10 namespace content { 11 namespace cc_blink {
11 12
12 inline SkXfermode::Mode BlendModeToSkia(blink::WebBlendMode blend_mode) { 13 inline SkXfermode::Mode BlendModeToSkia(blink::WebBlendMode blend_mode) {
13 switch (blend_mode) { 14 switch (blend_mode) {
14 case blink::WebBlendModeNormal: 15 case blink::WebBlendModeNormal:
15 return SkXfermode::kSrcOver_Mode; 16 return SkXfermode::kSrcOver_Mode;
16 case blink::WebBlendModeMultiply: 17 case blink::WebBlendModeMultiply:
17 return SkXfermode::kMultiply_Mode; 18 return SkXfermode::kMultiply_Mode;
18 case blink::WebBlendModeScreen: 19 case blink::WebBlendModeScreen:
19 return SkXfermode::kScreen_Mode; 20 return SkXfermode::kScreen_Mode;
20 case blink::WebBlendModeOverlay: 21 case blink::WebBlendModeOverlay:
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 case SkXfermode::kSrcATop_Mode: 95 case SkXfermode::kSrcATop_Mode:
95 case SkXfermode::kDstATop_Mode: 96 case SkXfermode::kDstATop_Mode:
96 case SkXfermode::kXor_Mode: 97 case SkXfermode::kXor_Mode:
97 case SkXfermode::kPlus_Mode: 98 case SkXfermode::kPlus_Mode:
98 case SkXfermode::kModulate_Mode: 99 case SkXfermode::kModulate_Mode:
99 NOTREACHED(); 100 NOTREACHED();
100 } 101 }
101 return blink::WebBlendModeNormal; 102 return blink::WebBlendModeNormal;
102 } 103 }
103 104
104 } // namespace content 105 } // namespace cc_blink
105 106
106 #endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ 107 #endif // CC_BLINK_WEB_BLEND_MODE_H_
107
OLDNEW
« no previous file with comments | « cc/blink/web_animation_unittest.cc ('k') | cc/blink/web_compositor_support_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698