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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 localMatrix.preScale(scale.width(), scale.height()); | 263 localMatrix.preScale(scale.width(), scale.height()); |
264 | 264 |
265 SkBitmap bitmapToPaint; | 265 SkBitmap bitmapToPaint; |
266 bitmap.extractSubset(&bitmapToPaint, enclosingIntRect(normSrcRect)); | 266 bitmap.extractSubset(&bitmapToPaint, enclosingIntRect(normSrcRect)); |
267 | 267 |
268 { | 268 { |
269 SkPaint paint = context->fillPaint(); | 269 SkPaint paint = context->fillPaint(); |
270 paint.setColor(SK_ColorBLACK); | 270 paint.setColor(SK_ColorBLACK); |
271 paint.setXfermodeMode(compositeOp); | 271 paint.setXfermodeMode(compositeOp); |
272 paint.setFilterQuality(context->computeFilterQuality(this, destRect, nor
mSrcRect)); | 272 paint.setFilterQuality(context->computeFilterQuality(this, destRect, nor
mSrcRect)); |
273 paint.setAntiAlias(context->shouldAntialiasImages()); | 273 paint.setAntiAlias(context->shouldAntialias()); |
274 RefPtr<SkShader> shader = createPatternShader(bitmapToPaint, localMatrix
, paint, | 274 RefPtr<SkShader> shader = createPatternShader(bitmapToPaint, localMatrix
, paint, |
275 FloatSize(repeatSpacing.width() / scale.width(), repeatSpacing.heigh
t() / scale.height())); | 275 FloatSize(repeatSpacing.width() / scale.width(), repeatSpacing.heigh
t() / scale.height())); |
276 paint.setShader(shader.get()); | 276 paint.setShader(shader.get()); |
277 context->drawRect(destRect, paint); | 277 context->drawRect(destRect, paint); |
278 } | 278 } |
279 | 279 |
280 if (DeferredImageDecoder::isLazyDecoded(bitmap)) | 280 if (DeferredImageDecoder::isLazyDecoded(bitmap)) |
281 PlatformInstrumentation::didDrawLazyPixelRef(bitmap.getGenerationID()); | 281 PlatformInstrumentation::didDrawLazyPixelRef(bitmap.getGenerationID()); |
282 } | 282 } |
283 | 283 |
(...skipping 15 matching lines...) Expand all Loading... |
299 { | 299 { |
300 return false; | 300 return false; |
301 } | 301 } |
302 | 302 |
303 PassRefPtr<SkImage> Image::skImage() | 303 PassRefPtr<SkImage> Image::skImage() |
304 { | 304 { |
305 return nullptr; | 305 return nullptr; |
306 } | 306 } |
307 | 307 |
308 } // namespace blink | 308 } // namespace blink |
OLD | NEW |