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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 return focusRingOutset(offset) + (focusRingWidth(width) + 1) / 2; | 383 return focusRingOutset(offset) + (focusRingWidth(width) + 1) / 2; |
384 } | 384 } |
385 | 385 |
386 // public decl needed for OwnPtr wrapper. | 386 // public decl needed for OwnPtr wrapper. |
387 class RecordingState; | 387 class RecordingState; |
388 | 388 |
389 #if ENABLE(ASSERT) | 389 #if ENABLE(ASSERT) |
390 void setInDrawingRecorder(bool); | 390 void setInDrawingRecorder(bool); |
391 #endif | 391 #endif |
392 | 392 |
| 393 static PassRefPtr<SkColorFilter> WebCoreColorFilterToSkiaColorFilter(ColorFi
lter); |
| 394 |
393 private: | 395 private: |
394 const GraphicsContextState* immutableState() const { return m_paintState; } | 396 const GraphicsContextState* immutableState() const { return m_paintState; } |
395 | 397 |
396 GraphicsContextState* mutableState() | 398 GraphicsContextState* mutableState() |
397 { | 399 { |
398 realizePaintSave(); | 400 realizePaintSave(); |
399 return m_paintState; | 401 return m_paintState; |
400 } | 402 } |
401 | 403 |
402 static void setPathFromPoints(SkPath*, size_t, const FloatPoint*); | 404 static void setPathFromPoints(SkPath*, size_t, const FloatPoint*); |
403 static void setRadii(SkVector*, FloatSize, FloatSize, FloatSize, FloatSize); | 405 static void setRadii(SkVector*, FloatSize, FloatSize, FloatSize, FloatSize); |
404 | 406 |
405 static PassRefPtr<SkColorFilter> WebCoreColorFilterToSkiaColorFilter(ColorFi
lter); | |
406 | |
407 #if OS(MACOSX) | 407 #if OS(MACOSX) |
408 static inline int focusRingOutset(int offset) { return offset + 2; } | 408 static inline int focusRingOutset(int offset) { return offset + 2; } |
409 static inline int focusRingWidth(int width) { return width; } | 409 static inline int focusRingWidth(int width) { return width; } |
410 #else | 410 #else |
411 static inline int focusRingOutset(int offset) { return 0; } | 411 static inline int focusRingOutset(int offset) { return 0; } |
412 static inline int focusRingWidth(int width) { return 1; } | 412 static inline int focusRingWidth(int width) { return 1; } |
413 static SkPMColor lineColors(int); | 413 static SkPMColor lineColors(int); |
414 static SkPMColor antiColors1(int); | 414 static SkPMColor antiColors1(int); |
415 static SkPMColor antiColors2(int); | 415 static SkPMColor antiColors2(int); |
416 static void draw1xMarker(SkBitmap*, int); | 416 static void draw1xMarker(SkBitmap*, int); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 | 500 |
501 unsigned m_accelerated : 1; | 501 unsigned m_accelerated : 1; |
502 unsigned m_isCertainlyOpaque : 1; | 502 unsigned m_isCertainlyOpaque : 1; |
503 unsigned m_printing : 1; | 503 unsigned m_printing : 1; |
504 unsigned m_antialiasHairlineImages : 1; | 504 unsigned m_antialiasHairlineImages : 1; |
505 }; | 505 }; |
506 | 506 |
507 } // namespace blink | 507 } // namespace blink |
508 | 508 |
509 #endif // GraphicsContext_h | 509 #endif // GraphicsContext_h |
OLD | NEW |