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

Side by Side Diff: sky/engine/platform/graphics/skia/SkiaUtils.h

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 52
53 // move this guy into SkColor.h 53 // move this guy into SkColor.h
54 SkColor SkPMColorToColor(SkPMColor); 54 SkColor SkPMColorToColor(SkPMColor);
55 55
56 inline SkPaint::FilterLevel WebCoreInterpolationQualityToSkFilterLevel(Interpola tionQuality quality) 56 inline SkFilterQuality WebCoreInterpolationQualityToSkFilterQuality(Interpolatio nQuality quality)
57 { 57 {
58 // FIXME: this reflects existing client mappings, but should probably 58 // FIXME: this reflects existing client mappings, but should probably
59 // be expanded to map higher level interpolations more accurately. 59 // be expanded to map higher level interpolations more accurately.
60 return quality != InterpolationNone ? SkPaint::kLow_FilterLevel : SkPaint::k None_FilterLevel; 60 return quality != InterpolationNone ? kLow_SkFilterQuality : kNone_SkFilterQ uality;
61 } 61 }
62 62
63 // Skia has problems when passed infinite, etc floats, filter them to 0. 63 // Skia has problems when passed infinite, etc floats, filter them to 0.
64 inline SkScalar WebCoreFloatToSkScalar(float f) 64 inline SkScalar WebCoreFloatToSkScalar(float f)
65 { 65 {
66 return SkFloatToScalar(std::isfinite(f) ? f : 0); 66 return SkFloatToScalar(std::isfinite(f) ? f : 0);
67 } 67 }
68 68
69 inline SkScalar WebCoreDoubleToSkScalar(double d) 69 inline SkScalar WebCoreDoubleToSkScalar(double d)
70 { 70 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 float srcHeight, 102 float srcHeight,
103 float destWidth, 103 float destWidth,
104 float destHeight, 104 float destHeight,
105 bool isDataComplete = true); 105 bool isDataComplete = true);
106 106
107 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect); 107 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect);
108 108
109 } // namespace blink 109 } // namespace blink
110 110
111 #endif // SKY_ENGINE_PLATFORM_GRAPHICS_SKIA_SKIAUTILS_H_ 111 #endif // SKY_ENGINE_PLATFORM_GRAPHICS_SKIA_SKIAUTILS_H_
OLDNEW
« no previous file with comments | « sky/engine/platform/graphics/skia/NativeImageSkia.cpp ('k') | testing/buildbot/chromium.fyi.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698