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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp

Issue 2768143002: Back PaintRecord with PaintOpBuffer instead of SkPicture (Closed)
Patch Set: vmpstr review, fix mac theme issuesa Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 bool SVGImage::applyShaderInternal(PaintFlags& flags, 357 bool SVGImage::applyShaderInternal(PaintFlags& flags,
358 const SkMatrix& localMatrix, 358 const SkMatrix& localMatrix,
359 const KURL& url) { 359 const KURL& url) {
360 const FloatSize size(containerSize()); 360 const FloatSize size(containerSize());
361 if (size.isEmpty()) 361 if (size.isEmpty())
362 return false; 362 return false;
363 363
364 FloatRect floatBounds(FloatPoint(), size); 364 FloatRect floatBounds(FloatPoint(), size);
365 const SkRect bounds(floatBounds); 365 const SkRect bounds(floatBounds);
366 366
367 flags.setShader(SkShader::MakePictureShader( 367 flags.setShader(MakePaintShaderRecord(
368 paintRecordForCurrentFrame(floatBounds, url), SkShader::kRepeat_TileMode, 368 paintRecordForCurrentFrame(floatBounds, url), SkShader::kRepeat_TileMode,
369 SkShader::kRepeat_TileMode, &localMatrix, &bounds)); 369 SkShader::kRepeat_TileMode, &localMatrix, &bounds));
370 370
371 // Animation is normally refreshed in draw() impls, which we don't reach when 371 // Animation is normally refreshed in draw() impls, which we don't reach when
372 // painting via shaders. 372 // painting via shaders.
373 startAnimation(); 373 startAnimation();
374 374
375 return true; 375 return true;
376 } 376 }
377 377
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 } 690 }
691 691
692 return m_page ? SizeAvailable : SizeUnavailable; 692 return m_page ? SizeAvailable : SizeUnavailable;
693 } 693 }
694 694
695 String SVGImage::filenameExtension() const { 695 String SVGImage::filenameExtension() const {
696 return "svg"; 696 return "svg";
697 } 697 }
698 698
699 } // namespace blink 699 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698