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

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

Issue 1170523002: Removing GraphicsContext from ImageBuffer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix unit test crashes Created 5 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 | Annotate | Revision Log
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // and fonts are rendered. 145 // and fonts are rendered.
146 void setDeviceScaleFactor(float factor) { m_deviceScaleFactor = factor; } 146 void setDeviceScaleFactor(float factor) { m_deviceScaleFactor = factor; }
147 float deviceScaleFactor() const { return m_deviceScaleFactor; } 147 float deviceScaleFactor() const { return m_deviceScaleFactor; }
148 148
149 // Returns if the context is a printing context instead of a display 149 // Returns if the context is a printing context instead of a display
150 // context. Bitmap shouldn't be resampled when printing to keep the best 150 // context. Bitmap shouldn't be resampled when printing to keep the best
151 // possible quality. 151 // possible quality.
152 bool printing() const { return m_printing; } 152 bool printing() const { return m_printing; }
153 void setPrinting(bool printing) { m_printing = printing; } 153 void setPrinting(bool printing) { m_printing = printing; }
154 154
155 bool isAccelerated() const { return m_accelerated; }
156 void setAccelerated(bool accelerated) { m_accelerated = accelerated; }
157
158 SkColorFilter* colorFilter() const; 155 SkColorFilter* colorFilter() const;
159 void setColorFilter(ColorFilter); 156 void setColorFilter(ColorFilter);
160 // ---------- End state management methods ----------------- 157 // ---------- End state management methods -----------------
161 158
162 // These draw methods will do both stroking and filling. 159 // These draw methods will do both stroking and filling.
163 // FIXME: ...except drawRect(), which fills properly but always strokes 160 // FIXME: ...except drawRect(), which fills properly but always strokes
164 // using a 1-pixel stroke inset from the rect borders (of the correct 161 // using a 1-pixel stroke inset from the rect borders (of the correct
165 // stroke color). 162 // stroke color).
166 void drawRect(const IntRect&); 163 void drawRect(const IntRect&);
167 void drawLine(const IntPoint&, const IntPoint&); 164 void drawLine(const IntPoint&, const IntPoint&);
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 #if ENABLE(ASSERT) 393 #if ENABLE(ASSERT)
397 unsigned m_layerCount; 394 unsigned m_layerCount;
398 bool m_disableDestructionChecks; 395 bool m_disableDestructionChecks;
399 bool m_inDrawingRecorder; 396 bool m_inDrawingRecorder;
400 #endif 397 #endif
401 398
402 const DisabledMode m_disabledState; 399 const DisabledMode m_disabledState;
403 400
404 float m_deviceScaleFactor; 401 float m_deviceScaleFactor;
405 402
406 unsigned m_accelerated : 1;
407 unsigned m_printing : 1; 403 unsigned m_printing : 1;
408 }; 404 };
409 405
410 } // namespace blink 406 } // namespace blink
411 407
412 #endif // GraphicsContext_h 408 #endif // GraphicsContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698