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

Unified Diff: src/gpu/GrTextContext.cpp

Issue 1196683003: remove SkDeviceProperties (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrTextContext.cpp
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index 5559b2da6d3d6b1b54315550b1dc2a40d3d80f8f..90328584a30de49dcccf4925e318138224cc9a4a 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -21,10 +21,10 @@
#include "SkTextToPathIter.h"
GrTextContext::GrTextContext(GrContext* context, GrDrawContext* drawContext,
- const SkDeviceProperties& properties)
+ const SkSurfaceProps& surfaceProps)
: fFallbackTextContext(NULL)
, fContext(context)
- , fDeviceProperties(properties)
+ , fSurfaceProps(surfaceProps)
, fDrawContext(drawContext) {
}
@@ -108,14 +108,14 @@ bool GrTextContext::ShouldDisableLCD(const SkPaint& paint) {
return false;
}
-uint32_t GrTextContext::FilterTextFlags(const SkDeviceProperties& devProps, const SkPaint& paint) {
+uint32_t GrTextContext::FilterTextFlags(const SkSurfaceProps& surfaceProps, const SkPaint& paint) {
uint32_t flags = paint.getFlags();
if (!paint.isLCDRenderText() || !paint.isAntiAlias()) {
return flags;
}
- if (kUnknown_SkPixelGeometry == devProps.pixelGeometry() || ShouldDisableLCD(paint)) {
+ if (kUnknown_SkPixelGeometry == surfaceProps.pixelGeometry() || ShouldDisableLCD(paint)) {
flags &= ~SkPaint::kLCDRenderText_Flag;
flags |= SkPaint::kGenA8FromLCD_Flag;
}
@@ -144,7 +144,7 @@ void GrTextContext::drawTextBlob(GrRenderTarget* rt,
continue;
}
- runPaint.setFlags(FilterTextFlags(fDeviceProperties, runPaint));
+ runPaint.setFlags(FilterTextFlags(fSurfaceProps, runPaint));
GrPaint grPaint;
if (!SkPaint2GrPaint(fContext, fRenderTarget, runPaint, viewMatrix, true, &grPaint)) {
« no previous file with comments | « src/gpu/GrTextContext.h ('k') | src/gpu/SkGpuDevice.h » ('j') | src/gpu/SkGpuDevice.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698