Devirtualize read/write pixels on surface.
Consolidate read/write funcs in context.
Remove support for reading pixels from a surface that's not a target. It's currently broken and neither used nor tested.
Review URL: https://codereview.chromium.org/648863002
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
index a1f5ce6..183b83c 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -190,10 +190,9 @@
return;
}
- context->writeTexturePixels(*gammaTexture,
- 0, 0, width, height,
- (*gammaTexture)->config(), data.get(), 0,
- GrContext::kDontFlush_PixelOpsFlag);
+ (*gammaTexture)->writePixels(0, 0, width, height,
+ (*gammaTexture)->config(), data.get(), 0,
+ GrContext::kDontFlush_PixelOpsFlag);
}
}