OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 RefPtr<SkShader> shader = createPatternShader(image.get(), localMatrix,
paint, | 252 RefPtr<SkShader> shader = createPatternShader(image.get(), localMatrix,
paint, |
253 FloatSize(repeatSpacing.width() / scale.width(), repeatSpacing.heigh
t() / scale.height())); | 253 FloatSize(repeatSpacing.width() / scale.width(), repeatSpacing.heigh
t() / scale.height())); |
254 paint.setShader(shader.get()); | 254 paint.setShader(shader.get()); |
255 context.drawRect(destRect, paint); | 255 context.drawRect(destRect, paint); |
256 } | 256 } |
257 | 257 |
258 if (currentFrameIsLazyDecoded()) | 258 if (currentFrameIsLazyDecoded()) |
259 PlatformInstrumentation::didDrawLazyPixelRef(imageID); | 259 PlatformInstrumentation::didDrawLazyPixelRef(imageID); |
260 } | 260 } |
261 | 261 |
262 void Image::computeIntrinsicDimensions(FloatSize& intrinsicSize, FloatSize& intr
insicRatio) | |
263 { | |
264 intrinsicSize = intrinsicRatio = FloatSize(size()); | |
265 } | |
266 | |
267 PassRefPtr<Image> Image::imageForDefaultFrame() | 262 PassRefPtr<Image> Image::imageForDefaultFrame() |
268 { | 263 { |
269 RefPtr<Image> image(this); | 264 RefPtr<Image> image(this); |
270 | 265 |
271 return image.release(); | 266 return image.release(); |
272 } | 267 } |
273 | 268 |
274 bool Image::isTextureBacked() | 269 bool Image::isTextureBacked() |
275 { | 270 { |
276 RefPtr<SkImage> image = imageForCurrentFrame(); | 271 RefPtr<SkImage> image = imageForCurrentFrame(); |
277 return image ? image->isTextureBacked() : false; | 272 return image ? image->isTextureBacked() : false; |
278 } | 273 } |
279 | 274 |
280 } // namespace blink | 275 } // namespace blink |
OLD | NEW |