OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 WebSize WebImage::size() const | 134 WebSize WebImage::size() const |
135 { | 135 { |
136 return WebSize(m_bitmap.width(), m_bitmap.height()); | 136 return WebSize(m_bitmap.width(), m_bitmap.height()); |
137 } | 137 } |
138 | 138 |
139 WebImage::WebImage(PassRefPtr<Image> image) | 139 WebImage::WebImage(PassRefPtr<Image> image) |
140 { | 140 { |
141 if (!image) | 141 if (!image) |
142 return; | 142 return; |
143 | 143 |
144 if (RefPtr<SkImage> skImage = image->imageForCurrentFrame()) | 144 if (sk_sp<SkImage> skImage = image->imageForCurrentFrame()) |
145 skImage->asLegacyBitmap(&m_bitmap, SkImage::kRO_LegacyBitmapMode); | 145 skImage->asLegacyBitmap(&m_bitmap, SkImage::kRO_LegacyBitmapMode); |
146 } | 146 } |
147 | 147 |
148 } // namespace blink | 148 } // namespace blink |
OLD | NEW |