aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrRenderTargetContext.cpp')
-rw-r--r--src/gpu/GrRenderTargetContext.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index a67e19a9d9..fd515c7ec7 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -27,6 +27,7 @@
#include "GrStyle.h"
#include "GrTracing.h"
#include "SkDrawShadowInfo.h"
+#include "SkGlyphRun.h"
#include "SkGr.h"
#include "SkLatticeIter.h"
#include "SkMatrixPriv.h"
@@ -53,12 +54,15 @@
#include "text/GrTextContext.h"
#include "text/GrTextUtils.h"
+
+
class GrRenderTargetContext::TextTarget : public GrTextUtils::Target {
public:
TextTarget(GrRenderTargetContext* renderTargetContext)
: Target(renderTargetContext->width(), renderTargetContext->height(),
renderTargetContext->colorSpaceInfo())
- , fRenderTargetContext(renderTargetContext) {}
+ , fRenderTargetContext(renderTargetContext)
+ , fGlyphDrawer{*renderTargetContext}{}
void addDrawOp(const GrClip& clip, std::unique_ptr<GrAtlasTextOp> op) override {
fRenderTargetContext->addDrawOp(clip, std::move(op));
@@ -87,8 +91,14 @@ public:
return fRenderTargetContext->fContext;
}
+ SkGlyphRunListDrawer* glyphDrawer() override {
+ return &fGlyphDrawer;
+ }
+
private:
GrRenderTargetContext* fRenderTargetContext;
+ SkGlyphRunListDrawer fGlyphDrawer;
+
};
#define ASSERT_OWNED_RESOURCE(R) SkASSERT(!(R) || (R)->getContext() == this->drawingManager()->getContext())