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

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

Issue 16357011: Remove support for -webkit-color-correction (which we've never supported on (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: resolve merge conflicts, obey brace style changes Created 7 years, 6 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void saveLayer(const SkRect* bounds, const SkPaint*, SkCanvas::SaveFlags = S kCanvas::kARGB_ClipLayer_SaveFlag); 103 void saveLayer(const SkRect* bounds, const SkPaint*, SkCanvas::SaveFlags = S kCanvas::kARGB_ClipLayer_SaveFlag);
104 void restoreLayer(); 104 void restoreLayer();
105 105
106 float strokeThickness() const { return m_state->m_strokeThickness; } 106 float strokeThickness() const { return m_state->m_strokeThickness; }
107 void setStrokeThickness(float thickness) { m_state->m_strokeThickness = thic kness; } 107 void setStrokeThickness(float thickness) { m_state->m_strokeThickness = thic kness; }
108 108
109 StrokeStyle strokeStyle() const { return m_state->m_strokeStyle; } 109 StrokeStyle strokeStyle() const { return m_state->m_strokeStyle; }
110 void setStrokeStyle(StrokeStyle style) { m_state->m_strokeStyle = style; } 110 void setStrokeStyle(StrokeStyle style) { m_state->m_strokeStyle = style; }
111 111
112 Color strokeColor() const { return m_state->m_strokeColor; } 112 Color strokeColor() const { return m_state->m_strokeColor; }
113 ColorSpace strokeColorSpace() const { return m_state->m_strokeColorSpace; } 113 void setStrokeColor(const Color&);
114 void setStrokeColor(const Color&, ColorSpace);
115 114
116 Pattern* strokePattern() const { return m_state->m_strokePattern.get(); } 115 Pattern* strokePattern() const { return m_state->m_strokePattern.get(); }
117 void setStrokePattern(PassRefPtr<Pattern>); 116 void setStrokePattern(PassRefPtr<Pattern>);
118 117
119 Gradient* strokeGradient() const { return m_state->m_strokeGradient.get(); } 118 Gradient* strokeGradient() const { return m_state->m_strokeGradient.get(); }
120 void setStrokeGradient(PassRefPtr<Gradient>); 119 void setStrokeGradient(PassRefPtr<Gradient>);
121 120
122 void setLineCap(LineCap cap) { m_state->m_lineCap = (SkPaint::Cap)cap; } 121 void setLineCap(LineCap cap) { m_state->m_lineCap = (SkPaint::Cap)cap; }
123 void setLineDash(const DashArray&, float dashOffset); 122 void setLineDash(const DashArray&, float dashOffset);
124 void setLineJoin(LineJoin join) { m_state->m_lineJoin = (SkPaint::Join)join; } 123 void setLineJoin(LineJoin join) { m_state->m_lineJoin = (SkPaint::Join)join; }
125 void setMiterLimit(float limit) { m_state->m_miterLimit = limit; } 124 void setMiterLimit(float limit) { m_state->m_miterLimit = limit; }
126 125
127 WindRule fillRule() const { return m_state->m_fillRule; } 126 WindRule fillRule() const { return m_state->m_fillRule; }
128 void setFillRule(WindRule fillRule) { m_state->m_fillRule = fillRule; } 127 void setFillRule(WindRule fillRule) { m_state->m_fillRule = fillRule; }
129 128
130 Color fillColor() const { return m_state->m_fillColor; } 129 Color fillColor() const { return m_state->m_fillColor; }
131 ColorSpace fillColorSpace() const { return m_state->m_fillColorSpace; } 130 void setFillColor(const Color&);
132 void setFillColor(const Color&, ColorSpace);
133 SkColor effectiveFillColor() const { return m_state->applyAlpha(m_state->m_f illColor.rgb()); } 131 SkColor effectiveFillColor() const { return m_state->applyAlpha(m_state->m_f illColor.rgb()); }
134 132
135 void setFillPattern(PassRefPtr<Pattern>); 133 void setFillPattern(PassRefPtr<Pattern>);
136 Pattern* fillPattern() const { return m_state->m_fillPattern.get(); } 134 Pattern* fillPattern() const { return m_state->m_fillPattern.get(); }
137 135
138 void setFillGradient(PassRefPtr<Gradient>); 136 void setFillGradient(PassRefPtr<Gradient>);
139 Gradient* fillGradient() const { return m_state->m_fillGradient.get(); } 137 Gradient* fillGradient() const { return m_state->m_fillGradient.get(); }
140 138
141 SkDrawLooper* drawLooper() const { return m_state->m_looper; } 139 SkDrawLooper* drawLooper() const { return m_state->m_looper; }
142 void setDashPathEffect(SkDashPathEffect*); 140 void setDashPathEffect(SkDashPathEffect*);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 void drawEllipse(const IntRect&); 229 void drawEllipse(const IntRect&);
232 void drawConvexPolygon(size_t numPoints, const FloatPoint*, bool shouldAntia lias = false); 230 void drawConvexPolygon(size_t numPoints, const FloatPoint*, bool shouldAntia lias = false);
233 231
234 void fillPath(const Path&); 232 void fillPath(const Path&);
235 void strokePath(const Path&); 233 void strokePath(const Path&);
236 234
237 void fillEllipse(const FloatRect&); 235 void fillEllipse(const FloatRect&);
238 void strokeEllipse(const FloatRect&); 236 void strokeEllipse(const FloatRect&);
239 237
240 void fillRect(const FloatRect&); 238 void fillRect(const FloatRect&);
241 void fillRect(const FloatRect&, const Color&, ColorSpace); 239 void fillRect(const FloatRect&, const Color&);
242 void fillRect(const FloatRect& rect, Gradient& gradient) { gradient.fill(thi s, rect); } 240 void fillRect(const FloatRect& rect, Gradient& gradient) { gradient.fill(thi s, rect); }
243 void fillRect(const FloatRect&, const Color&, ColorSpace, CompositeOperator) ; 241 void fillRect(const FloatRect&, const Color&, CompositeOperator);
244 void fillRoundedRect(const IntRect&, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color&, C olorSpace); 242 void fillRoundedRect(const IntRect&, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color&);
245 void fillRoundedRect(const RoundedRect&, const Color&, ColorSpace); 243 void fillRoundedRect(const RoundedRect&, const Color&);
246 void fillRectWithRoundedHole(const IntRect&, const RoundedRect& roundedHoleR ect, const Color&, ColorSpace); 244 void fillRectWithRoundedHole(const IntRect&, const RoundedRect& roundedHoleR ect, const Color&);
247 245
248 void clearRect(const FloatRect&); 246 void clearRect(const FloatRect&);
249 247
250 void strokeRect(const FloatRect&, float lineWidth); 248 void strokeRect(const FloatRect&, float lineWidth);
251 249
252 void drawImage(Image*, ColorSpace styleColorSpace, const IntPoint&, Composit eOperator = CompositeSourceOver, RespectImageOrientationEnum = DoNotRespectImage Orientation); 250 void drawImage(Image*, const IntPoint&, CompositeOperator = CompositeSourceO ver, RespectImageOrientationEnum = DoNotRespectImageOrientation);
253 void drawImage(Image*, ColorSpace styleColorSpace, const IntRect&, Composite Operator = CompositeSourceOver, RespectImageOrientationEnum = DoNotRespectImageO rientation, bool useLowQualityScale = false); 251 void drawImage(Image*, const IntRect&, CompositeOperator = CompositeSourceOv er, RespectImageOrientationEnum = DoNotRespectImageOrientation, bool useLowQuali tyScale = false);
254 void drawImage(Image*, ColorSpace styleColorSpace, const IntPoint& destPoint , const IntRect& srcRect, CompositeOperator = CompositeSourceOver, RespectImageO rientationEnum = DoNotRespectImageOrientation); 252 void drawImage(Image*, const IntPoint& destPoint, const IntRect& srcRect, Co mpositeOperator = CompositeSourceOver, RespectImageOrientationEnum = DoNotRespec tImageOrientation);
255 void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect ); 253 void drawImage(Image*, const FloatRect& destRect);
256 void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect , const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, RespectImag eOrientationEnum = DoNotRespectImageOrientation, bool useLowQualityScale = false ); 254 void drawImage(Image*, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, RespectImageOrientationEnum = DoNotResp ectImageOrientation, bool useLowQualityScale = false);
257 void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect , const FloatRect& srcRect, CompositeOperator, BlendMode, RespectImageOrientatio nEnum = DoNotRespectImageOrientation, bool useLowQualityScale = false); 255 void drawImage(Image*, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator, BlendMode, RespectImageOrientationEnum = DoNotRespectImageOri entation, bool useLowQualityScale = false);
258 256
259 void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destR ect, const IntPoint& srcPoint, const IntSize& tileSize, 257 void drawTiledImage(Image*, const IntRect& destRect, const IntPoint& srcPoin t, const IntSize& tileSize,
260 CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false , BlendMode = BlendModeNormal); 258 CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false , BlendMode = BlendModeNormal);
261 void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destR ect, const IntRect& srcRect, 259 void drawTiledImage(Image*, const IntRect& destRect, const IntRect& srcRect,
262 const FloatSize& tileScaleFactor, Image::TileRule hRule = Image::Stretch Tile, Image::TileRule vRule = Image::StretchTile, 260 const FloatSize& tileScaleFactor, Image::TileRule hRule = Image::Stretch Tile, Image::TileRule vRule = Image::StretchTile,
263 CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false ); 261 CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false );
264 262
265 void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntPoin t&, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal); 263 void drawImageBuffer(ImageBuffer*, const IntPoint&, CompositeOperator = Comp ositeSourceOver, BlendMode = BlendModeNormal);
266 void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntRect &, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, bool us eLowQualityScale = false); 264 void drawImageBuffer(ImageBuffer*, const IntRect&, CompositeOperator = Compo siteSourceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false);
267 void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntPoin t& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, B lendMode = BlendModeNormal); 265 void drawImageBuffer(ImageBuffer*, const IntPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal);
268 void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntRect & destRect, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, Ble ndMode = BlendModeNormal, bool useLowQualityScale = false); 266 void drawImageBuffer(ImageBuffer*, const IntRect& destRect, const IntRect& s rcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, bo ol useLowQualityScale = false);
269 void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const FloatRe ct& destRect); 267 void drawImageBuffer(ImageBuffer*, const FloatRect& destRect);
270 void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const FloatRe ct& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false); 268 void drawImageBuffer(ImageBuffer*, const FloatRect& destRect, const FloatRec t& srcRect, CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal , bool useLowQualityScale = false);
271 269
272 // These methods write to the canvas and modify the opaque region, if tracke d. 270 // These methods write to the canvas and modify the opaque region, if tracke d.
273 // Also drawLine(const IntPoint& point1, const IntPoint& point2) and fillRou ndedRect 271 // Also drawLine(const IntPoint& point1, const IntPoint& point2) and fillRou ndedRect
274 void writePixels(const SkBitmap&, int x, int y, SkCanvas::Config8888 = SkCan vas::kNative_Premul_Config8888); 272 void writePixels(const SkBitmap&, int x, int y, SkCanvas::Config8888 = SkCan vas::kNative_Premul_Config8888);
275 void drawBitmap(const SkBitmap&, SkScalar, SkScalar, const SkPaint* = 0); 273 void drawBitmap(const SkBitmap&, SkScalar, SkScalar, const SkPaint* = 0);
276 void drawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&, const SkP aint* = 0); 274 void drawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&, const SkP aint* = 0);
277 void drawOval(const SkRect&, const SkPaint&); 275 void drawOval(const SkRect&, const SkPaint&);
278 void drawPath(const SkPath&, const SkPaint&); 276 void drawPath(const SkPath&, const SkPaint&);
279 // After drawing directly to the context's canvas, use this function to noti fy the context so 277 // After drawing directly to the context's canvas, use this function to noti fy the context so
280 // it can track the opaque region. 278 // it can track the opaque region.
(...skipping 11 matching lines...) Expand all
292 void clipOut(const IntRect& rect) { clipRect(rect, NotAntiAliased, SkRegion: :kDifference_Op); } 290 void clipOut(const IntRect& rect) { clipRect(rect, NotAntiAliased, SkRegion: :kDifference_Op); }
293 void clipOutRoundedRect(const RoundedRect&); 291 void clipOutRoundedRect(const RoundedRect&);
294 void clipPath(const Path&, WindRule = RULE_EVENODD); 292 void clipPath(const Path&, WindRule = RULE_EVENODD);
295 void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias = true); 293 void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias = true);
296 void clipToImageBuffer(ImageBuffer*, const FloatRect&); 294 void clipToImageBuffer(ImageBuffer*, const FloatRect&);
297 bool clipRect(const SkRect&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op); 295 bool clipRect(const SkRect&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op);
298 296
299 void drawText(const Font&, const TextRunPaintInfo&, const FloatPoint&); 297 void drawText(const Font&, const TextRunPaintInfo&, const FloatPoint&);
300 void drawEmphasisMarks(const Font&, const TextRunPaintInfo&, const AtomicStr ing& mark, const FloatPoint&); 298 void drawEmphasisMarks(const Font&, const TextRunPaintInfo&, const AtomicStr ing& mark, const FloatPoint&);
301 void drawBidiText(const Font&, const TextRunPaintInfo&, const FloatPoint&, F ont::CustomFontNotReadyAction = Font::DoNotPaintIfFontNotReady); 299 void drawBidiText(const Font&, const TextRunPaintInfo&, const FloatPoint&, F ont::CustomFontNotReadyAction = Font::DoNotPaintIfFontNotReady);
302 void drawHighlightForText(const Font&, const TextRun&, const FloatPoint&, in t h, const Color& backgroundColor, ColorSpace, int from = 0, int to = -1); 300 void drawHighlightForText(const Font&, const TextRun&, const FloatPoint&, in t h, const Color& backgroundColor, int from = 0, int to = -1);
303 301
304 void drawLineForText(const FloatPoint&, float width, bool printing); 302 void drawLineForText(const FloatPoint&, float width, bool printing);
305 enum DocumentMarkerLineStyle { 303 enum DocumentMarkerLineStyle {
306 DocumentMarkerSpellingLineStyle, 304 DocumentMarkerSpellingLineStyle,
307 DocumentMarkerGrammarLineStyle 305 DocumentMarkerGrammarLineStyle
308 }; 306 };
309 void drawLineForDocumentMarker(const FloatPoint&, float width, DocumentMarke rLineStyle); 307 void drawLineForDocumentMarker(const FloatPoint&, float width, DocumentMarke rLineStyle);
310 308
311 void beginTransparencyLayer(float opacity); 309 void beginTransparencyLayer(float opacity);
312 void endTransparencyLayer(); 310 void endTransparencyLayer();
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 // FIXME: Make this go away: crbug.com/236892 471 // FIXME: Make this go away: crbug.com/236892
474 bool m_updatingControlTints : 1; 472 bool m_updatingControlTints : 1;
475 bool m_accelerated : 1; 473 bool m_accelerated : 1;
476 bool m_isCertainlyOpaque : 1; 474 bool m_isCertainlyOpaque : 1;
477 bool m_printing : 1; 475 bool m_printing : 1;
478 }; 476 };
479 477
480 } // namespace WebCore 478 } // namespace WebCore
481 479
482 #endif // GraphicsContext_h 480 #endif // GraphicsContext_h
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/GeneratorGeneratedImage.cpp ('k') | Source/core/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698