| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
| 4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 int getNormalizedAlpha() const | 172 int getNormalizedAlpha() const |
| 173 { | 173 { |
| 174 int alpha = immutableState()->alpha(); | 174 int alpha = immutableState()->alpha(); |
| 175 return alpha > 255 ? 255 : alpha; | 175 return alpha > 255 ? 255 : alpha; |
| 176 } | 176 } |
| 177 | 177 |
| 178 void setImageInterpolationQuality(InterpolationQuality quality) { mutableSta
te()->setInterpolationQuality(quality); } | 178 void setImageInterpolationQuality(InterpolationQuality quality) { mutableSta
te()->setInterpolationQuality(quality); } |
| 179 InterpolationQuality imageInterpolationQuality() const { return immutableSta
te()->interpolationQuality(); } | 179 InterpolationQuality imageInterpolationQuality() const { return immutableSta
te()->interpolationQuality(); } |
| 180 | 180 |
| 181 void setCompositeOperation(SkXfermode::Mode); | 181 void setCompositeOperation(SkXfermode::Mode); |
| 182 SkXfermode::Mode compositeOperation() const; |
| 182 // TODO(dshwang): remove these method. crbug.com/425656 | 183 // TODO(dshwang): remove these method. crbug.com/425656 |
| 183 void setCompositeOperation(CompositeOperator, WebBlendMode = WebBlendModeNor
mal); | 184 CompositeOperator compositeOperationDeprecated() const; |
| 184 CompositeOperator compositeOperation() const; | |
| 185 WebBlendMode blendModeOperation() const; | 185 WebBlendMode blendModeOperation() const; |
| 186 | 186 |
| 187 // Specify the device scale factor which may change the way document markers | 187 // Specify the device scale factor which may change the way document markers |
| 188 // and fonts are rendered. | 188 // and fonts are rendered. |
| 189 void setDeviceScaleFactor(float factor) { m_deviceScaleFactor = factor; } | 189 void setDeviceScaleFactor(float factor) { m_deviceScaleFactor = factor; } |
| 190 float deviceScaleFactor() const { return m_deviceScaleFactor; } | 190 float deviceScaleFactor() const { return m_deviceScaleFactor; } |
| 191 | 191 |
| 192 // If true we are (most likely) rendering to a web page and the | 192 // If true we are (most likely) rendering to a web page and the |
| 193 // canvas has been prepared with an opaque background. If false, | 193 // canvas has been prepared with an opaque background. If false, |
| 194 // the canvas may have transparency (as is the case when rendering | 194 // the canvas may have transparency (as is the case when rendering |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 unsigned m_accelerated : 1; | 521 unsigned m_accelerated : 1; |
| 522 unsigned m_isCertainlyOpaque : 1; | 522 unsigned m_isCertainlyOpaque : 1; |
| 523 unsigned m_printing : 1; | 523 unsigned m_printing : 1; |
| 524 unsigned m_antialiasHairlineImages : 1; | 524 unsigned m_antialiasHairlineImages : 1; |
| 525 unsigned m_shouldSmoothFonts : 1; | 525 unsigned m_shouldSmoothFonts : 1; |
| 526 }; | 526 }; |
| 527 | 527 |
| 528 } // namespace blink | 528 } // namespace blink |
| 529 | 529 |
| 530 #endif // GraphicsContext_h | 530 #endif // GraphicsContext_h |
| OLD | NEW |