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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 std::move(toImage), percentage, | 45 std::move(toImage), percentage, |
46 crossfadeSize, size)); | 46 crossfadeSize, size)); |
47 } | 47 } |
48 | 48 |
49 bool usesContainerSize() const override { return false; } | 49 bool usesContainerSize() const override { return false; } |
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(PaintCanvas*, |
56 const SkPaint&, | 56 const PaintFlags&, |
57 const FloatRect&, | 57 const FloatRect&, |
58 const FloatRect&, | 58 const FloatRect&, |
59 RespectImageOrientationEnum, | 59 RespectImageOrientationEnum, |
60 ImageClampingMode, | 60 ImageClampingMode, |
61 const ColorBehavior&) override; | 61 const ColorBehavior&) override; |
62 void drawTile(GraphicsContext&, const FloatRect&) final; | 62 void drawTile(GraphicsContext&, const FloatRect&) final; |
63 | 63 |
64 CrossfadeGeneratedImage(PassRefPtr<Image> fromImage, | 64 CrossfadeGeneratedImage(PassRefPtr<Image> fromImage, |
65 PassRefPtr<Image> toImage, | 65 PassRefPtr<Image> toImage, |
66 float percentage, | 66 float percentage, |
67 IntSize crossfadeSize, | 67 IntSize crossfadeSize, |
68 const IntSize&); | 68 const IntSize&); |
69 | 69 |
70 private: | 70 private: |
71 void drawCrossfade(SkCanvas*, | 71 void drawCrossfade(PaintCanvas*, |
72 const SkPaint&, | 72 const SkPaint&, |
73 ImageClampingMode, | 73 ImageClampingMode, |
74 const ColorBehavior&); | 74 const ColorBehavior&); |
75 | 75 |
76 RefPtr<Image> m_fromImage; | 76 RefPtr<Image> m_fromImage; |
77 RefPtr<Image> m_toImage; | 77 RefPtr<Image> m_toImage; |
78 | 78 |
79 float m_percentage; | 79 float m_percentage; |
80 IntSize m_crossfadeSize; | 80 IntSize m_crossfadeSize; |
81 }; | 81 }; |
82 | 82 |
83 } // namespace blink | 83 } // namespace blink |
84 | 84 |
85 #endif | 85 #endif |
OLD | NEW |