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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 IntSize size() const override | 56 IntSize size() const override |
57 { | 57 { |
58 return m_size; | 58 return m_size; |
59 } | 59 } |
60 | 60 |
61 PassRefPtr<SkImage> imageForCurrentFrame() override | 61 PassRefPtr<SkImage> imageForCurrentFrame() override |
62 { | 62 { |
63 return m_image; | 63 return m_image; |
64 } | 64 } |
65 | 65 |
66 void destroyDecodedData(bool) override | 66 void destroyDecodedData() override |
67 { | 67 { |
68 // Image pure virtual stub. | 68 // Image pure virtual stub. |
69 } | 69 } |
70 | 70 |
71 void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, Res
pectImageOrientationEnum, ImageClampingMode) override | 71 void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, Res
pectImageOrientationEnum, ImageClampingMode) override |
72 { | 72 { |
73 // Image pure virtual stub. | 73 // Image pure virtual stub. |
74 } | 74 } |
75 | 75 |
76 private: | 76 private: |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 ASSERT_FALSE(graphicsLayer->contentsLayer()); | 142 ASSERT_FALSE(graphicsLayer->contentsLayer()); |
143 | 143 |
144 graphicsLayer->setContentsToImage(opaqueImage.get()); | 144 graphicsLayer->setContentsToImage(opaqueImage.get()); |
145 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); | 145 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); |
146 | 146 |
147 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); | 147 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); |
148 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); | 148 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); |
149 } | 149 } |
150 | 150 |
151 } // namespace blink | 151 } // namespace blink |
OLD | NEW |