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

Unified Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 645993002: Fix LCD text handling for SVG filters. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 8b118ee83df56bb2bddc68c8adc858cfb26771d3..5f07bcf9a1d9c3c08b3e8269a11d552145ecbcfd 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -70,12 +70,13 @@ struct GraphicsContext::CanvasSaveState {
};
struct GraphicsContext::RecordingState {
- RecordingState(SkPictureRecorder* recorder, SkCanvas* currentCanvas, const SkMatrix& currentMatrix,
+ RecordingState(SkPictureRecorder* recorder, SkCanvas* currentCanvas, const SkMatrix& currentMatrix, bool currentShouldSmoothFonts,
PassRefPtr<DisplayList> displayList, RegionTrackingMode trackingMode)
: m_displayList(displayList)
, m_recorder(recorder)
, m_savedCanvas(currentCanvas)
, m_savedMatrix(currentMatrix)
+ , m_savedShouldSmoothFonts(currentShouldSmoothFonts)
, m_regionTrackingMode(trackingMode) { }
~RecordingState() { }
@@ -84,6 +85,7 @@ struct GraphicsContext::RecordingState {
SkPictureRecorder* m_recorder;
SkCanvas* m_savedCanvas;
const SkMatrix m_savedMatrix;
+ bool m_savedShouldSmoothFonts;
RegionTrackingMode m_regionTrackingMode;
};
@@ -508,7 +510,7 @@ void GraphicsContext::beginRecording(const FloatRect& bounds, uint32_t recordFla
}
}
- m_recordingStateStack.append(RecordingState(recorder, savedCanvas, savedMatrix, displayList,
+ m_recordingStateStack.append(RecordingState(recorder, savedCanvas, savedMatrix, m_shouldSmoothFonts, displayList,
static_cast<RegionTrackingMode>(m_regionTrackingMode)));
// Disable region tracking during recording.
@@ -525,6 +527,7 @@ PassRefPtr<DisplayList> GraphicsContext::endRecording()
m_canvas = recording.m_savedCanvas;
setRegionTrackingMode(recording.m_regionTrackingMode);
+ setShouldSmoothFonts(recording.m_savedShouldSmoothFonts);
delete recording.m_recorder;
m_recordingStateStack.removeLast();
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698