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

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

Issue 210043004: Draw thin slices of an image w/ anti-aliasing for 2D <canvas> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase; Rename some more. Created 6 years, 8 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
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 SkDrawLooper* drawLooper() const { return immutableState()->drawLooper(); } 130 SkDrawLooper* drawLooper() const { return immutableState()->drawLooper(); }
131 131
132 FloatRect getClipBounds() const; 132 FloatRect getClipBounds() const;
133 bool getTransformedClipBounds(FloatRect* bounds) const; 133 bool getTransformedClipBounds(FloatRect* bounds) const;
134 SkMatrix getTotalMatrix() const; 134 SkMatrix getTotalMatrix() const;
135 135
136 void setShouldAntialias(bool antialias) { mutableState()->setShouldAntialias (antialias); } 136 void setShouldAntialias(bool antialias) { mutableState()->setShouldAntialias (antialias); }
137 bool shouldAntialias() const { return immutableState()->shouldAntialias(); } 137 bool shouldAntialias() const { return immutableState()->shouldAntialias(); }
138 138
139 // Disable the optimization that disables anti-aliasing for
Justin Novosad 2014/04/01 17:02:01 Double negation: Disabling the disabling is more c
fs 2014/04/02 08:31:37 Made this read more like the name of the method.
140 // scale/multiple-of-90-degrees rotation for thin ("hairline") images.
141 void disableAntialiasingOptimizationForHairlineImages() { m_antialiasHairlin eImages = true; }
142 bool shouldAntialiasHairlineImages() const { return m_antialiasHairlineImage s; }
143
139 void setShouldClampToSourceRect(bool clampToSourceRect) { mutableState()->se tShouldClampToSourceRect(clampToSourceRect); } 144 void setShouldClampToSourceRect(bool clampToSourceRect) { mutableState()->se tShouldClampToSourceRect(clampToSourceRect); }
140 bool shouldClampToSourceRect() const { return immutableState()->shouldClampT oSourceRect(); } 145 bool shouldClampToSourceRect() const { return immutableState()->shouldClampT oSourceRect(); }
141 146
142 void setShouldSmoothFonts(bool smoothFonts) { mutableState()->setShouldSmoot hFonts(smoothFonts); } 147 void setShouldSmoothFonts(bool smoothFonts) { mutableState()->setShouldSmoot hFonts(smoothFonts); }
143 bool shouldSmoothFonts() const { return immutableState()->shouldSmoothFonts( ); } 148 bool shouldSmoothFonts() const { return immutableState()->shouldSmoothFonts( ); }
144 149
145 // Turn off LCD text for the paint if not supported on this context. 150 // Turn off LCD text for the paint if not supported on this context.
146 void adjustTextRenderMode(SkPaint*); 151 void adjustTextRenderMode(SkPaint*);
147 bool couldUseLCDRenderedText(); 152 bool couldUseLCDRenderedText();
148 153
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 bool m_trackTextRegion : 1; 502 bool m_trackTextRegion : 1;
498 SkRect m_textRegion; 503 SkRect m_textRegion;
499 504
500 // Are we on a high DPI display? If so, spelling and grammar markers are lar ger. 505 // Are we on a high DPI display? If so, spelling and grammar markers are lar ger.
501 bool m_useHighResMarker : 1; 506 bool m_useHighResMarker : 1;
502 // FIXME: Make this go away: crbug.com/236892 507 // FIXME: Make this go away: crbug.com/236892
503 bool m_updatingControlTints : 1; 508 bool m_updatingControlTints : 1;
504 bool m_accelerated : 1; 509 bool m_accelerated : 1;
505 bool m_isCertainlyOpaque : 1; 510 bool m_isCertainlyOpaque : 1;
506 bool m_printing : 1; 511 bool m_printing : 1;
512 bool m_antialiasHairlineImages : 1;
507 }; 513 };
508 514
509 } // namespace WebCore 515 } // namespace WebCore
510 516
511 #endif // GraphicsContext_h 517 #endif // GraphicsContext_h
OLDNEW
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698