OLD | NEW |
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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 if (contextDisabled()) | 784 if (contextDisabled()) |
785 return; | 785 return; |
786 | 786 |
787 fillRect(font.selectionRectForText(run, point, h, from, to), backgroundColor
); | 787 fillRect(font.selectionRectForText(run, point, h, from, to), backgroundColor
); |
788 } | 788 } |
789 | 789 |
790 void GraphicsContext::drawImage(Image* image, const IntRect& r, SkXfermode::Mode
op, RespectImageOrientationEnum shouldRespectImageOrientation) | 790 void GraphicsContext::drawImage(Image* image, const IntRect& r, SkXfermode::Mode
op, RespectImageOrientationEnum shouldRespectImageOrientation) |
791 { | 791 { |
792 if (!image) | 792 if (!image) |
793 return; | 793 return; |
794 drawImage(image, FloatRect(r), FloatRect(FloatPoint(), FloatSize(image->size
())), op, shouldRespectImageOrientation); | 794 drawImage(image, FloatRect(r), FloatRect(FloatPoint(), FloatSize(image->defa
ultConcreteObjectSize())), op, shouldRespectImageOrientation); |
795 } | 795 } |
796 | 796 |
797 void GraphicsContext::drawImage(Image* image, const FloatRect& dest, const Float
Rect& src, SkXfermode::Mode op, RespectImageOrientationEnum shouldRespectImageOr
ientation) | 797 void GraphicsContext::drawImage(Image* image, const FloatRect& dest, const Float
Rect& src, SkXfermode::Mode op, RespectImageOrientationEnum shouldRespectImageOr
ientation) |
798 { | 798 { |
799 if (contextDisabled() || !image) | 799 if (contextDisabled() || !image) |
800 return; | 800 return; |
801 | 801 |
802 SkPaint imagePaint = immutableState()->fillPaint(); | 802 SkPaint imagePaint = immutableState()->fillPaint(); |
803 imagePaint.setXfermodeMode(op); | 803 imagePaint.setXfermodeMode(op); |
804 imagePaint.setColor(SK_ColorBLACK); | 804 imagePaint.setColor(SK_ColorBLACK); |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 static const SkPMColor colors[] = { | 1360 static const SkPMColor colors[] = { |
1361 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red | 1361 SkPreMultiplyARGB(0x60, 0xFF, 0x00, 0x00), // More transparent red |
1362 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray | 1362 SkPreMultiplyARGB(0x60, 0xC0, 0xC0, 0xC0) // More transparent gray |
1363 }; | 1363 }; |
1364 | 1364 |
1365 return colors[index]; | 1365 return colors[index]; |
1366 } | 1366 } |
1367 #endif | 1367 #endif |
1368 | 1368 |
1369 } // namespace blink | 1369 } // namespace blink |
OLD | NEW |