| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // and fonts are rendered. | 146 // and fonts are rendered. |
| 147 void setDeviceScaleFactor(float factor) { m_deviceScaleFactor = factor; } | 147 void setDeviceScaleFactor(float factor) { m_deviceScaleFactor = factor; } |
| 148 float deviceScaleFactor() const { return m_deviceScaleFactor; } | 148 float deviceScaleFactor() const { return m_deviceScaleFactor; } |
| 149 | 149 |
| 150 // Returns if the context is a printing context instead of a display | 150 // Returns if the context is a printing context instead of a display |
| 151 // context. Bitmap shouldn't be resampled when printing to keep the best | 151 // context. Bitmap shouldn't be resampled when printing to keep the best |
| 152 // possible quality. | 152 // possible quality. |
| 153 bool printing() const { return m_printing; } | 153 bool printing() const { return m_printing; } |
| 154 void setPrinting(bool printing) { m_printing = printing; } | 154 void setPrinting(bool printing) { m_printing = printing; } |
| 155 | 155 |
| 156 bool isAccelerated() const { return m_accelerated; } | |
| 157 void setAccelerated(bool accelerated) { m_accelerated = accelerated; } | |
| 158 | |
| 159 SkColorFilter* colorFilter() const; | 156 SkColorFilter* colorFilter() const; |
| 160 void setColorFilter(ColorFilter); | 157 void setColorFilter(ColorFilter); |
| 161 // ---------- End state management methods ----------------- | 158 // ---------- End state management methods ----------------- |
| 162 | 159 |
| 163 // These draw methods will do both stroking and filling. | 160 // These draw methods will do both stroking and filling. |
| 164 // FIXME: ...except drawRect(), which fills properly but always strokes | 161 // FIXME: ...except drawRect(), which fills properly but always strokes |
| 165 // using a 1-pixel stroke inset from the rect borders (of the correct | 162 // using a 1-pixel stroke inset from the rect borders (of the correct |
| 166 // stroke color). | 163 // stroke color). |
| 167 void drawRect(const IntRect&); | 164 void drawRect(const IntRect&); |
| 168 void drawLine(const IntPoint&, const IntPoint&); | 165 void drawLine(const IntPoint&, const IntPoint&); |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 #if ENABLE(ASSERT) | 398 #if ENABLE(ASSERT) |
| 402 unsigned m_layerCount; | 399 unsigned m_layerCount; |
| 403 bool m_disableDestructionChecks; | 400 bool m_disableDestructionChecks; |
| 404 bool m_inDrawingRecorder; | 401 bool m_inDrawingRecorder; |
| 405 #endif | 402 #endif |
| 406 | 403 |
| 407 const DisabledMode m_disabledState; | 404 const DisabledMode m_disabledState; |
| 408 | 405 |
| 409 float m_deviceScaleFactor; | 406 float m_deviceScaleFactor; |
| 410 | 407 |
| 411 unsigned m_accelerated : 1; | |
| 412 unsigned m_printing : 1; | 408 unsigned m_printing : 1; |
| 413 unsigned m_hasMetaData : 1; | 409 unsigned m_hasMetaData : 1; |
| 414 }; | 410 }; |
| 415 | 411 |
| 416 } // namespace blink | 412 } // namespace blink |
| 417 | 413 |
| 418 #endif // GraphicsContext_h | 414 #endif // GraphicsContext_h |
| OLD | NEW |