Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: Source/platform/graphics/Image.cpp

Issue 1179143003: SP: antialias images regardless of CTM. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698