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

Side by Side Diff: Source/core/platform/graphics/GraphicsContext.h

Issue 23947005: Implement CSS luminance masking using skia SkLumaMaskXfermode class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 * 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 void setAlpha(float alpha) { m_state->m_alpha = alpha; } 158 void setAlpha(float alpha) { m_state->m_alpha = alpha; }
159 159
160 void setImageInterpolationQuality(InterpolationQuality quality) { m_state->m _interpolationQuality = quality; } 160 void setImageInterpolationQuality(InterpolationQuality quality) { m_state->m _interpolationQuality = quality; }
161 InterpolationQuality imageInterpolationQuality() const { return m_state->m_i nterpolationQuality; } 161 InterpolationQuality imageInterpolationQuality() const { return m_state->m_i nterpolationQuality; }
162 162
163 void setCompositeOperation(CompositeOperator, BlendMode = BlendModeNormal); 163 void setCompositeOperation(CompositeOperator, BlendMode = BlendModeNormal);
164 CompositeOperator compositeOperation() const { return m_state->m_compositeOp erator; } 164 CompositeOperator compositeOperation() const { return m_state->m_compositeOp erator; }
165 BlendMode blendModeOperation() const { return m_state->m_blendMode; } 165 BlendMode blendModeOperation() const { return m_state->m_blendMode; }
166 166
167 void setDrawLuminanceMask(bool drawLuminanceMask) { m_state->m_drawLuminance Mask = drawLuminanceMask; }
168 bool drawLuminanceMask() const { return m_state->m_drawLuminanceMask; }
169
167 // Change the way document markers are rendered. 170 // Change the way document markers are rendered.
168 // Any deviceScaleFactor higher than 1.5 is enough to justify setting this f lag. 171 // Any deviceScaleFactor higher than 1.5 is enough to justify setting this f lag.
169 void setUseHighResMarkers(bool isHighRes) { m_useHighResMarker = isHighRes; } 172 void setUseHighResMarkers(bool isHighRes) { m_useHighResMarker = isHighRes; }
170 173
171 // If true we are (most likely) rendering to a web page and the 174 // If true we are (most likely) rendering to a web page and the
172 // canvas has been prepared with an opaque background. If false, 175 // canvas has been prepared with an opaque background. If false,
173 // the canvas may havbe transparency (as is the case when rendering 176 // the canvas may havbe transparency (as is the case when rendering
174 // to a canvas object). 177 // to a canvas object).
175 void setCertainlyOpaque(bool isOpaque) { m_isCertainlyOpaque = isOpaque; } 178 void setCertainlyOpaque(bool isOpaque) { m_isCertainlyOpaque = isOpaque; }
176 bool isCertainlyOpaque() const { return m_isCertainlyOpaque; } 179 bool isCertainlyOpaque() const { return m_isCertainlyOpaque; }
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // FIXME: Make this go away: crbug.com/236892 470 // FIXME: Make this go away: crbug.com/236892
468 bool m_updatingControlTints : 1; 471 bool m_updatingControlTints : 1;
469 bool m_accelerated : 1; 472 bool m_accelerated : 1;
470 bool m_isCertainlyOpaque : 1; 473 bool m_isCertainlyOpaque : 1;
471 bool m_printing : 1; 474 bool m_printing : 1;
472 }; 475 };
473 476
474 } // namespace WebCore 477 } // namespace WebCore
475 478
476 #endif // GraphicsContext_h 479 #endif // GraphicsContext_h
OLDNEW
« no previous file with comments | « LayoutTests/css3/masking/resources/dice.png ('k') | Source/core/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698