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

Unified Diff: src/gpu/GrTextContext.h

Issue 1157773003: Move SkGpuDevice::internalDrawPath to GrBlurUtils::drawPathWithMaskFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 5 years, 7 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 | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextContext.h
diff --git a/src/gpu/GrTextContext.h b/src/gpu/GrTextContext.h
index 242ae3abe44a8b18c7f8ef56edb6792b0e6a90a6..07485f4d17f99fb57e33163fc3840026269c5cdd 100644
--- a/src/gpu/GrTextContext.h
+++ b/src/gpu/GrTextContext.h
@@ -16,7 +16,7 @@
class GrClip;
class GrContext;
-class GrDrawTarget;
+class GrDrawContext;
class GrFontScaler;
class SkDrawFilter;
class SkGpuDevice;
@@ -37,18 +37,14 @@ public:
const char text[], size_t byteLength,
const SkScalar pos[], int scalarsPerPosition,
const SkPoint& offset, const SkIRect& clipBounds);
- virtual void drawTextBlob(GrRenderTarget*, const GrClip&, const SkPaint&,
- const SkMatrix& viewMatrix, const SkTextBlob*, SkScalar x, SkScalar y,
+ virtual void drawTextBlob(SkGpuDevice*, GrRenderTarget*, const GrClip&, const SkPaint&,
+ const SkMatrix& viewMatrix, const SkTextBlob*,
+ SkScalar x, SkScalar y,
SkDrawFilter*, const SkIRect& clipBounds);
protected:
GrTextContext* fFallbackTextContext;
GrContext* fContext;
- // TODO we probably don't really need to store a back pointer to the owning SkGpuDevice, except
- // we need to be able to call drawPath on it in the event no other text context can draw the
- // text. We might be able to move this logic to context though. This is unreffed because
- // GrTextContext is completely owned by SkGpuDevice
- SkGpuDevice* fGpuDevice;
SkDeviceProperties fDeviceProperties;
SkAutoTUnref<GrRenderTarget> fRenderTarget;
@@ -58,24 +54,28 @@ protected:
GrPaint fPaint;
SkPaint fSkPaint;
- GrTextContext(GrContext*, SkGpuDevice*, const SkDeviceProperties&);
+ GrTextContext(GrContext*, const SkDeviceProperties&);
virtual bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&,
const SkPaint&, const SkMatrix& viewMatrix) = 0;
- virtual void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&,
+ virtual void onDrawText(GrDrawContext*, GrRenderTarget*, const GrClip&,
+ const GrPaint&, const SkPaint&,
const SkMatrix& viewMatrix, const char text[], size_t byteLength,
SkScalar x, SkScalar y, const SkIRect& clipBounds) = 0;
- virtual void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&,
+ virtual void onDrawPosText(GrDrawContext*, GrRenderTarget*, const GrClip&,
+ const GrPaint&, const SkPaint&,
const SkMatrix& viewMatrix,
const char text[], size_t byteLength,
const SkScalar pos[], int scalarsPerPosition,
const SkPoint& offset, const SkIRect& clipBounds) = 0;
- void drawTextAsPath(const SkPaint& origPaint, const SkMatrix& viewMatrix,
+ void drawTextAsPath(GrDrawContext*, GrRenderTarget*, const GrClip& clip,
+ const SkPaint& origPaint, const SkMatrix& viewMatrix,
const char text[], size_t byteLength, SkScalar x, SkScalar y,
const SkIRect& clipBounds);
- void drawPosTextAsPath(const SkPaint& origPaint, const SkMatrix& viewMatrix,
+ void drawPosTextAsPath(GrDrawContext*, GrRenderTarget*, const GrClip& clip,
+ const SkPaint& origPaint, const SkMatrix& viewMatrix,
const char text[], size_t byteLength,
const SkScalar pos[], int scalarsPerPosition,
const SkPoint& offset, const SkIRect& clipBounds);
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698