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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp

Issue 2488163002: Include paint of background (tiled) image in FCP (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | 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) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google 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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 893
894 void GraphicsContext::drawTiledImage(Image* image, 894 void GraphicsContext::drawTiledImage(Image* image,
895 const FloatRect& destRect, 895 const FloatRect& destRect,
896 const FloatPoint& srcPoint, 896 const FloatPoint& srcPoint,
897 const FloatSize& tileSize, 897 const FloatSize& tileSize,
898 SkBlendMode op, 898 SkBlendMode op,
899 const FloatSize& repeatSpacing) { 899 const FloatSize& repeatSpacing) {
900 if (contextDisabled() || !image) 900 if (contextDisabled() || !image)
901 return; 901 return;
902 image->drawTiled(*this, destRect, srcPoint, tileSize, op, repeatSpacing); 902 image->drawTiled(*this, destRect, srcPoint, tileSize, op, repeatSpacing);
903 m_paintController.setImagePainted();
903 } 904 }
904 905
905 void GraphicsContext::drawTiledImage(Image* image, 906 void GraphicsContext::drawTiledImage(Image* image,
906 const FloatRect& dest, 907 const FloatRect& dest,
907 const FloatRect& srcRect, 908 const FloatRect& srcRect,
908 const FloatSize& tileScaleFactor, 909 const FloatSize& tileScaleFactor,
909 Image::TileRule hRule, 910 Image::TileRule hRule,
910 Image::TileRule vRule, 911 Image::TileRule vRule,
911 SkBlendMode op) { 912 SkBlendMode op) {
912 if (contextDisabled() || !image) 913 if (contextDisabled() || !image)
913 return; 914 return;
914 915
915 if (hRule == Image::StretchTile && vRule == Image::StretchTile) { 916 if (hRule == Image::StretchTile && vRule == Image::StretchTile) {
916 // Just do a scale. 917 // Just do a scale.
917 drawImage(image, dest, &srcRect, op); 918 drawImage(image, dest, &srcRect, op);
918 return; 919 return;
919 } 920 }
920 921
921 image->drawTiled(*this, dest, srcRect, tileScaleFactor, hRule, vRule, op); 922 image->drawTiled(*this, dest, srcRect, tileScaleFactor, hRule, vRule, op);
Kunihiko Sakamoto 2016/11/10 01:45:30 Call setImagePainted() here too?
panicker 2016/11/10 01:59:43 Done. (Sorry saw drawImage() above, but missed the
922 } 923 }
923 924
924 void GraphicsContext::drawOval(const SkRect& oval, const SkPaint& paint) { 925 void GraphicsContext::drawOval(const SkRect& oval, const SkPaint& paint) {
925 if (contextDisabled()) 926 if (contextDisabled())
926 return; 927 return;
927 ASSERT(m_canvas); 928 ASSERT(m_canvas);
928 929
929 m_canvas->drawOval(oval, paint); 930 m_canvas->drawOval(oval, paint);
930 } 931 }
931 932
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 static const SkPMColor colors[] = { 1411 static const SkPMColor colors[] = {
1411 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red 1412 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red
1412 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray 1413 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray
1413 }; 1414 };
1414 1415
1415 return colors[index]; 1416 return colors[index];
1416 } 1417 }
1417 #endif 1418 #endif
1418 1419
1419 } // namespace blink 1420 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698