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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 // center of the path aligned with the offset, so only half of the width
is outside of the offset. | 264 // center of the path aligned with the offset, so only half of the width
is outside of the offset. |
265 return focusRingOffset(offset) + (focusRingWidth(width) + 1) / 2; | 265 return focusRingOffset(offset) + (focusRingWidth(width) + 1) / 2; |
266 } | 266 } |
267 | 267 |
268 #if OS(MACOSX) | 268 #if OS(MACOSX) |
269 static int focusRingWidth(int width) { return width; } | 269 static int focusRingWidth(int width) { return width; } |
270 #else | 270 #else |
271 static int focusRingWidth(int width) { return 1; } | 271 static int focusRingWidth(int width) { return 1; } |
272 #endif | 272 #endif |
273 | 273 |
274 #if ENABLE(ASSERT) | 274 #if DCHECK_IS_ON() |
275 void setInDrawingRecorder(bool); | 275 void setInDrawingRecorder(bool); |
276 #endif | 276 #endif |
277 | 277 |
278 static PassRefPtr<SkColorFilter> WebCoreColorFilterToSkiaColorFilter(ColorFi
lter); | 278 static PassRefPtr<SkColorFilter> WebCoreColorFilterToSkiaColorFilter(ColorFi
lter); |
279 | 279 |
280 private: | 280 private: |
281 const GraphicsContextState* immutableState() const { return m_paintState; } | 281 const GraphicsContextState* immutableState() const { return m_paintState; } |
282 | 282 |
283 GraphicsContextState* mutableState() | 283 GraphicsContextState* mutableState() |
284 { | 284 { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 Vector<std::unique_ptr<GraphicsContextState>> m_paintStateStack; | 346 Vector<std::unique_ptr<GraphicsContextState>> m_paintStateStack; |
347 // Current index on the stack. May not be the last thing on the stack. | 347 // Current index on the stack. May not be the last thing on the stack. |
348 unsigned m_paintStateIndex; | 348 unsigned m_paintStateIndex; |
349 // Raw pointer to the current state. | 349 // Raw pointer to the current state. |
350 GraphicsContextState* m_paintState; | 350 GraphicsContextState* m_paintState; |
351 | 351 |
352 SkPictureRecorder m_pictureRecorder; | 352 SkPictureRecorder m_pictureRecorder; |
353 | 353 |
354 SkMetaData m_metaData; | 354 SkMetaData m_metaData; |
355 | 355 |
356 #if ENABLE(ASSERT) | 356 #if DCHECK_IS_ON() |
357 unsigned m_layerCount; | 357 unsigned m_layerCount; |
358 bool m_disableDestructionChecks; | 358 bool m_disableDestructionChecks; |
359 bool m_inDrawingRecorder; | 359 bool m_inDrawingRecorder; |
360 #endif | 360 #endif |
361 | 361 |
362 const DisabledMode m_disabledState; | 362 const DisabledMode m_disabledState; |
363 | 363 |
364 float m_deviceScaleFactor; | 364 float m_deviceScaleFactor; |
365 | 365 |
366 unsigned m_printing : 1; | 366 unsigned m_printing : 1; |
367 unsigned m_hasMetaData : 1; | 367 unsigned m_hasMetaData : 1; |
368 }; | 368 }; |
369 | 369 |
370 } // namespace blink | 370 } // namespace blink |
371 | 371 |
372 #endif // GraphicsContext_h | 372 #endif // GraphicsContext_h |
OLD | NEW |