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

Side by Side Diff: src/core/SkScalerContext.cpp

Issue 471473002: Optimize CSS box-shadow performance (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: backed blur mask with a bitmap Created 6 years, 3 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkScalerContext.h" 10 #include "SkScalerContext.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 } 604 }
605 605
606 // clean out our glyph, since it may be larger than dstM 606 // clean out our glyph, since it may be larger than dstM
607 //sk_bzero(dst, height * dstRB); 607 //sk_bzero(dst, height * dstRB);
608 608
609 while (--height >= 0) { 609 while (--height >= 0) {
610 memcpy(dst, src, width); 610 memcpy(dst, src, width);
611 src += srcRB; 611 src += srcRB;
612 dst += dstRB; 612 dst += dstRB;
613 } 613 }
614 SkMask::FreeImage(dstM.fImage);
615 614
616 if (fPreBlendForFilter.isApplicable()) { 615 if (fPreBlendForFilter.isApplicable()) {
617 applyLUTToA8Mask(srcM, fPreBlendForFilter.fG); 616 applyLUTToA8Mask(srcM, fPreBlendForFilter.fG);
618 } 617 }
619 } 618 }
620 } 619 }
621 } 620 }
622 621
623 void SkScalerContext::getPath(const SkGlyph& glyph, SkPath* path) { 622 void SkScalerContext::getPath(const SkGlyph& glyph, SkPath* path) {
624 this->internalGetPath(glyph, NULL, path, NULL); 623 this->internalGetPath(glyph, NULL, path, NULL);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, 791 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc,
793 bool allowFailure) const { 792 bool allowFailure) const {
794 SkScalerContext* c = this->onCreateScalerContext(desc); 793 SkScalerContext* c = this->onCreateScalerContext(desc);
795 794
796 if (!c && !allowFailure) { 795 if (!c && !allowFailure) {
797 c = SkNEW_ARGS(SkScalerContext_Empty, 796 c = SkNEW_ARGS(SkScalerContext_Empty,
798 (const_cast<SkTypeface*>(this), desc)); 797 (const_cast<SkTypeface*>(this), desc));
799 } 798 }
800 return c; 799 return c;
801 } 800 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698