OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 bool hasRelativeSize() const override { return false; } | 50 bool hasRelativeSize() const override { return false; } |
51 | 51 |
52 IntSize size() const override { return m_crossfadeSize; } | 52 IntSize size() const override { return m_crossfadeSize; } |
53 | 53 |
54 protected: | 54 protected: |
55 void draw(SkCanvas*, | 55 void draw(SkCanvas*, |
56 const SkPaint&, | 56 const SkPaint&, |
57 const FloatRect&, | 57 const FloatRect&, |
58 const FloatRect&, | 58 const FloatRect&, |
59 RespectImageOrientationEnum, | 59 RespectImageOrientationEnum, |
60 ImageClampingMode) override; | 60 ImageClampingMode, |
| 61 const ColorBehavior&) override; |
61 void drawTile(GraphicsContext&, const FloatRect&) final; | 62 void drawTile(GraphicsContext&, const FloatRect&) final; |
62 | 63 |
63 CrossfadeGeneratedImage(PassRefPtr<Image> fromImage, | 64 CrossfadeGeneratedImage(PassRefPtr<Image> fromImage, |
64 PassRefPtr<Image> toImage, | 65 PassRefPtr<Image> toImage, |
65 float percentage, | 66 float percentage, |
66 IntSize crossfadeSize, | 67 IntSize crossfadeSize, |
67 const IntSize&); | 68 const IntSize&); |
68 | 69 |
69 private: | 70 private: |
70 void drawCrossfade(SkCanvas*, const SkPaint&, ImageClampingMode); | 71 void drawCrossfade(SkCanvas*, |
| 72 const SkPaint&, |
| 73 ImageClampingMode, |
| 74 const ColorBehavior&); |
71 | 75 |
72 RefPtr<Image> m_fromImage; | 76 RefPtr<Image> m_fromImage; |
73 RefPtr<Image> m_toImage; | 77 RefPtr<Image> m_toImage; |
74 | 78 |
75 float m_percentage; | 79 float m_percentage; |
76 IntSize m_crossfadeSize; | 80 IntSize m_crossfadeSize; |
77 }; | 81 }; |
78 | 82 |
79 } // namespace blink | 83 } // namespace blink |
80 | 84 |
81 #endif | 85 #endif |
OLD | NEW |