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

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

Issue 2575533002: SkClipOp is an enum class now (Closed)
Patch Set: Created 4 years 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // Also drawLine(const IntPoint& point1, const IntPoint& point2) and 217 // Also drawLine(const IntPoint& point1, const IntPoint& point2) and
218 // fillRoundedRect(). 218 // fillRoundedRect().
219 void drawOval(const SkRect&, const SkPaint&); 219 void drawOval(const SkRect&, const SkPaint&);
220 void drawPath(const SkPath&, const SkPaint&); 220 void drawPath(const SkPath&, const SkPaint&);
221 void drawRect(const SkRect&, const SkPaint&); 221 void drawRect(const SkRect&, const SkPaint&);
222 void drawRRect(const SkRRect&, const SkPaint&); 222 void drawRRect(const SkRRect&, const SkPaint&);
223 223
224 void clip(const IntRect& rect) { clipRect(rect); } 224 void clip(const IntRect& rect) { clipRect(rect); }
225 void clip(const FloatRect& rect) { clipRect(rect); } 225 void clip(const FloatRect& rect) { clipRect(rect); }
226 void clipRoundedRect(const FloatRoundedRect&, 226 void clipRoundedRect(const FloatRoundedRect&,
227 SkClipOp = kIntersect_SkClipOp, 227 SkClipOp = SkClipOp::kIntersect,
228 AntiAliasingMode = AntiAliased); 228 AntiAliasingMode = AntiAliased);
229 void clipOut(const IntRect& rect) { 229 void clipOut(const IntRect& rect) {
230 clipRect(rect, NotAntiAliased, kDifference_SkClipOp); 230 clipRect(rect, NotAntiAliased, SkClipOp::kDifference);
231 } 231 }
232 void clipOut(const FloatRect& rect) { 232 void clipOut(const FloatRect& rect) {
233 clipRect(rect, NotAntiAliased, kDifference_SkClipOp); 233 clipRect(rect, NotAntiAliased, SkClipOp::kDifference);
234 } 234 }
235 void clipOut(const Path&); 235 void clipOut(const Path&);
236 void clipOutRoundedRect(const FloatRoundedRect&); 236 void clipOutRoundedRect(const FloatRoundedRect&);
237 void clipPath(const SkPath&, 237 void clipPath(const SkPath&,
238 AntiAliasingMode = NotAntiAliased, 238 AntiAliasingMode = NotAntiAliased,
239 SkClipOp = kIntersect_SkClipOp); 239 SkClipOp = SkClipOp::kIntersect);
240 void clipRect(const SkRect&, 240 void clipRect(const SkRect&,
241 AntiAliasingMode = NotAntiAliased, 241 AntiAliasingMode = NotAntiAliased,
242 SkClipOp = kIntersect_SkClipOp); 242 SkClipOp = SkClipOp::kIntersect);
243 243
244 void drawText(const Font&, const TextRunPaintInfo&, const FloatPoint&); 244 void drawText(const Font&, const TextRunPaintInfo&, const FloatPoint&);
245 void drawText(const Font&, 245 void drawText(const Font&,
246 const TextRunPaintInfo&, 246 const TextRunPaintInfo&,
247 const FloatPoint&, 247 const FloatPoint&,
248 const SkPaint&); 248 const SkPaint&);
249 void drawEmphasisMarks(const Font&, 249 void drawEmphasisMarks(const Font&,
250 const TextRunPaintInfo&, 250 const TextRunPaintInfo&,
251 const AtomicString& mark, 251 const AtomicString& mark,
252 const FloatPoint&); 252 const FloatPoint&);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 void saveLayer(const SkRect* bounds, const SkPaint*); 394 void saveLayer(const SkRect* bounds, const SkPaint*);
395 void restoreLayer(); 395 void restoreLayer();
396 396
397 // Helpers for drawing a focus ring (drawFocusRing) 397 // Helpers for drawing a focus ring (drawFocusRing)
398 void drawFocusRingPath(const SkPath&, const Color&, float width); 398 void drawFocusRingPath(const SkPath&, const Color&, float width);
399 void drawFocusRingRect(const SkRect&, const Color&, float width); 399 void drawFocusRingRect(const SkRect&, const Color&, float width);
400 400
401 // SkCanvas wrappers. 401 // SkCanvas wrappers.
402 void clipRRect(const SkRRect&, 402 void clipRRect(const SkRRect&,
403 AntiAliasingMode = NotAntiAliased, 403 AntiAliasingMode = NotAntiAliased,
404 SkClipOp = kIntersect_SkClipOp); 404 SkClipOp = SkClipOp::kIntersect);
405 void concat(const SkMatrix&); 405 void concat(const SkMatrix&);
406 406
407 // Apply deferred paint state saves 407 // Apply deferred paint state saves
408 void realizePaintSave() { 408 void realizePaintSave() {
409 if (contextDisabled()) 409 if (contextDisabled())
410 return; 410 return;
411 411
412 if (m_paintState->saveCount()) { 412 if (m_paintState->saveCount()) {
413 m_paintState->decrementSaveCount(); 413 m_paintState->decrementSaveCount();
414 ++m_paintStateIndex; 414 ++m_paintStateIndex;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 462
463 float m_deviceScaleFactor; 463 float m_deviceScaleFactor;
464 464
465 unsigned m_printing : 1; 465 unsigned m_printing : 1;
466 unsigned m_hasMetaData : 1; 466 unsigned m_hasMetaData : 1;
467 }; 467 };
468 468
469 } // namespace blink 469 } // namespace blink
470 470
471 #endif // GraphicsContext_h 471 #endif // GraphicsContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698