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

Side by Side Diff: Source/platform/graphics/skia/SkiaUtils.h

Issue 661053003: Make beginLayer() and CanvasRenderingContext2D use SkXfermode::Mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase to ToT Created 5 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2006,2007,2008, Google Inc. All rights reserved. 2 * Copyright (c) 2006,2007,2008, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "platform/graphics/Color.h" 42 #include "platform/graphics/Color.h"
43 #include "platform/graphics/GraphicsTypes.h" 43 #include "platform/graphics/GraphicsTypes.h"
44 #include "platform/transforms/AffineTransform.h" 44 #include "platform/transforms/AffineTransform.h"
45 #include "wtf/MathExtras.h" 45 #include "wtf/MathExtras.h"
46 46
47 namespace blink { 47 namespace blink {
48 48
49 class GraphicsContext; 49 class GraphicsContext;
50 50
51 SkXfermode::Mode PLATFORM_EXPORT WebCoreCompositeToSkiaComposite(CompositeOperat or, WebBlendMode = WebBlendModeNormal); 51 SkXfermode::Mode PLATFORM_EXPORT WebCoreCompositeToSkiaComposite(CompositeOperat or, WebBlendMode = WebBlendModeNormal);
52 CompositeOperator PLATFORM_EXPORT compositeOperatorFromSkia(SkXfermode::Mode);
53 WebBlendMode PLATFORM_EXPORT blendModeFromSkia(SkXfermode::Mode);
52 54
53 inline SkPaint::FilterLevel WebCoreInterpolationQualityToSkFilterLevel(Interpola tionQuality quality) 55 inline SkPaint::FilterLevel WebCoreInterpolationQualityToSkFilterLevel(Interpola tionQuality quality)
54 { 56 {
55 // FIXME: this reflects existing client mappings, but should probably 57 // FIXME: this reflects existing client mappings, but should probably
56 // be expanded to map higher level interpolations more accurately. 58 // be expanded to map higher level interpolations more accurately.
57 return quality != InterpolationNone ? SkPaint::kLow_FilterLevel : SkPaint::k None_FilterLevel; 59 return quality != InterpolationNone ? SkPaint::kLow_FilterLevel : SkPaint::k None_FilterLevel;
58 } 60 }
59 61
60 // Skia has problems when passed infinite, etc floats, filter them to 0. 62 // Skia has problems when passed infinite, etc floats, filter them to 0.
61 inline SkScalar WebCoreFloatToSkScalar(float f) 63 inline SkScalar WebCoreFloatToSkScalar(float f)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 float srcHeight, 101 float srcHeight,
100 float destWidth, 102 float destWidth,
101 float destHeight, 103 float destHeight,
102 bool isDataComplete = true); 104 bool isDataComplete = true);
103 105
104 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect); 106 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect);
105 107
106 } // namespace blink 108 } // namespace blink
107 109
108 #endif // SkiaUtils_h 110 #endif // SkiaUtils_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/FilterDisplayItem.cpp ('k') | Source/platform/graphics/skia/SkiaUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698