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 | 51 IntSize size() const override |
52 { | 52 { |
53 return m_size; | 53 return m_size; |
54 } | 54 } |
55 | 55 |
56 PassRefPtr<SkImage> imageForCurrentFrame() override | 56 PassRefPtr<SkImage> imageForCurrentFrame() override |
57 { | 57 { |
58 return m_image; | 58 return m_image; |
59 } | 59 } |
60 | 60 |
61 void destroyDecodedData(bool) override | 61 void destroyDecodedData() override |
62 { | 62 { |
63 // Image pure virtual stub. | 63 // Image pure virtual stub. |
64 } | 64 } |
65 | 65 |
66 void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, Res
pectImageOrientationEnum, ImageClampingMode) override | 66 void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, Res
pectImageOrientationEnum, ImageClampingMode) override |
67 { | 67 { |
68 // Image pure virtual stub. | 68 // Image pure virtual stub. |
69 } | 69 } |
70 | 70 |
71 private: | 71 private: |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 ASSERT_FALSE(graphicsLayer->contentsLayer()); | 129 ASSERT_FALSE(graphicsLayer->contentsLayer()); |
130 | 130 |
131 graphicsLayer->setContentsToImage(opaqueImage.get()); | 131 graphicsLayer->setContentsToImage(opaqueImage.get()); |
132 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); | 132 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); |
133 | 133 |
134 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); | 134 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); |
135 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); | 135 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); |
136 } | 136 } |
137 | 137 |
138 } // namespace blink | 138 } // namespace blink |
OLD | NEW |