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

Side by Side Diff: third_party/WebKit/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp

Issue 46097: WebKit merge 41660:41709 (WebKit side).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2006, Google Inc. All rights reserved. 2 * Copyright (c) 2006, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 if (paintingDisabled()) 664 if (paintingDisabled())
665 return; 665 return;
666 666
667 SkRect r = rect; 667 SkRect r = rect;
668 /* 668 /*
669 r.fLeft++; 669 r.fLeft++;
670 r.fRight--; 670 r.fRight--;
671 r.fTop++; 671 r.fTop++;
672 r.fBottom--; 672 r.fBottom--;
673 */ 673 */
674 if (!isRectSkiaSafe(getCTM(), r)) 674 if (!isRectSkiaSafe(getCTM(), r)) {
675 // See the fillRect below. 675 // See the fillRect below.
676 ClipRectToCanvas(*platformContext()->canvas(), r, &r); 676 ClipRectToCanvas(*platformContext()->canvas(), r, &r);
677 }
677 678
678 platformContext()->drawRect(r); 679 platformContext()->drawRect(r);
679 } 680 }
680 681
681 void GraphicsContext::fillPath() 682 void GraphicsContext::fillPath()
682 { 683 {
683 if (paintingDisabled()) 684 if (paintingDisabled())
684 return; 685 return;
685 686
686 SkPath path = platformContext()->currentPathInLocalCoordinates(); 687 SkPath path = platformContext()->currentPathInLocalCoordinates();
(...skipping 21 matching lines...) Expand all
708 709
709 platformContext()->canvas()->drawPath(path, paint); 710 platformContext()->canvas()->drawPath(path, paint);
710 } 711 }
711 712
712 void GraphicsContext::fillRect(const FloatRect& rect) 713 void GraphicsContext::fillRect(const FloatRect& rect)
713 { 714 {
714 if (paintingDisabled()) 715 if (paintingDisabled())
715 return; 716 return;
716 717
717 SkRect r = rect; 718 SkRect r = rect;
718 if (!isRectSkiaSafe(getCTM(), r)) 719 if (!isRectSkiaSafe(getCTM(), r)) {
719 // See the other version of fillRect below. 720 // See the other version of fillRect below.
720 ClipRectToCanvas(*platformContext()->canvas(), r, &r); 721 ClipRectToCanvas(*platformContext()->canvas(), r, &r);
722 }
721 723
722 const GraphicsContextState& state = m_common->state; 724 const GraphicsContextState& state = m_common->state;
723 ColorSpace colorSpace = state.fillColorSpace; 725 ColorSpace colorSpace = state.fillColorSpace;
724 726
725 if (colorSpace == SolidColorSpace && !fillColor().alpha()) 727 if (colorSpace == SolidColorSpace && !fillColor().alpha())
726 return; 728 return;
727 729
728 SkPaint paint; 730 SkPaint paint;
729 platformContext()->setupPaintForFilling(&paint); 731 platformContext()->setupPaintForFilling(&paint);
730 732
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 void GraphicsContext::translate(float w, float h) 1138 void GraphicsContext::translate(float w, float h)
1137 { 1139 {
1138 if (paintingDisabled()) 1140 if (paintingDisabled())
1139 return; 1141 return;
1140 1142
1141 platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w), 1143 platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w),
1142 WebCoreFloatToSkScalar(h)); 1144 WebCoreFloatToSkScalar(h));
1143 } 1145 }
1144 1146
1145 } // namespace WebCore 1147 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698