OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 IntSize size() const override { return m_size; } | 51 IntSize size() const override { return m_size; } |
52 | 52 |
53 sk_sp<SkImage> imageForCurrentFrame(const ColorBehavior&) override { | 53 sk_sp<SkImage> imageForCurrentFrame(const ColorBehavior&) override { |
54 return m_image; | 54 return m_image; |
55 } | 55 } |
56 | 56 |
57 void destroyDecodedData() override { | 57 void destroyDecodedData() override { |
58 // Image pure virtual stub. | 58 // Image pure virtual stub. |
59 } | 59 } |
60 | 60 |
61 void draw(SkCanvas*, | 61 void draw(PaintCanvas*, |
62 const SkPaint&, | 62 const PaintFlags&, |
63 const FloatRect&, | 63 const FloatRect&, |
64 const FloatRect&, | 64 const FloatRect&, |
65 RespectImageOrientationEnum, | 65 RespectImageOrientationEnum, |
66 ImageClampingMode, | 66 ImageClampingMode, |
67 const ColorBehavior&) override { | 67 const ColorBehavior&) override { |
68 // Image pure virtual stub. | 68 // Image pure virtual stub. |
69 } | 69 } |
70 | 70 |
71 private: | 71 private: |
72 TestImage(IntSize size, bool opaque) : Image(0), m_size(size) { | 72 TestImage(IntSize size, bool opaque) : Image(0), m_size(size) { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 ASSERT_FALSE(graphicsLayer->contentsLayer()); | 127 ASSERT_FALSE(graphicsLayer->contentsLayer()); |
128 | 128 |
129 graphicsLayer->setContentsToImage(opaqueImage.get()); | 129 graphicsLayer->setContentsToImage(opaqueImage.get()); |
130 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); | 130 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); |
131 | 131 |
132 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); | 132 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); |
133 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); | 133 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); |
134 } | 134 } |
135 | 135 |
136 } // namespace blink | 136 } // namespace blink |
OLD | NEW |