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

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

Issue 2820133005: Revert of Back PaintRecord with PaintOpBuffer instead of SkPicture (Closed)
Patch Set: 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 bool SVGImage::ApplyShaderInternal(PaintFlags& flags, 358 bool SVGImage::ApplyShaderInternal(PaintFlags& flags,
359 const SkMatrix& local_matrix, 359 const SkMatrix& local_matrix,
360 const KURL& url) { 360 const KURL& url) {
361 const FloatSize size(ContainerSize()); 361 const FloatSize size(ContainerSize());
362 if (size.IsEmpty()) 362 if (size.IsEmpty())
363 return false; 363 return false;
364 364
365 FloatRect float_bounds(FloatPoint(), size); 365 FloatRect float_bounds(FloatPoint(), size);
366 const SkRect bounds(float_bounds); 366 const SkRect bounds(float_bounds);
367 367
368 flags.setShader(MakePaintShaderRecord( 368 flags.setShader(SkShader::MakePictureShader(
369 PaintRecordForCurrentFrame(float_bounds, url), SkShader::kRepeat_TileMode, 369 PaintRecordForCurrentFrame(float_bounds, url), SkShader::kRepeat_TileMode,
370 SkShader::kRepeat_TileMode, &local_matrix, &bounds)); 370 SkShader::kRepeat_TileMode, &local_matrix, &bounds));
371 371
372 // Animation is normally refreshed in draw() impls, which we don't reach when 372 // Animation is normally refreshed in draw() impls, which we don't reach when
373 // painting via shaders. 373 // painting via shaders.
374 StartAnimation(); 374 StartAnimation();
375 375
376 return true; 376 return true;
377 } 377 }
378 378
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 } 694 }
695 695
696 return page_ ? kSizeAvailable : kSizeUnavailable; 696 return page_ ? kSizeAvailable : kSizeUnavailable;
697 } 697 }
698 698
699 String SVGImage::FilenameExtension() const { 699 String SVGImage::FilenameExtension() const {
700 return "svg"; 700 return "svg";
701 } 701 }
702 702
703 } // namespace blink 703 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698