From 649a3411f99a8aea3c46e4ef1f495f61b9801164 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 9 Mar 2017 13:50:43 -0500 Subject: Add a separate draw function to GrRenderTargetContext for GrMeshDrawOp derived classes. The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work. Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef Reviewed-on: https://skia-review.googlesource.com/9481 Commit-Queue: Brian Salomon Reviewed-by: Robert Phillips --- src/gpu/text/GrAtlasTextBlob.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gpu/text/GrAtlasTextBlob.cpp') diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp index 601eb372ea..accdf6b693 100644 --- a/src/gpu/text/GrAtlasTextBlob.cpp +++ b/src/gpu/text/GrAtlasTextBlob.cpp @@ -256,7 +256,7 @@ bool GrAtlasTextBlob::mustRegenerate(const GrTextUtils::Paint& paint, return false; } -inline std::unique_ptr GrAtlasTextBlob::makeOp( +inline std::unique_ptr GrAtlasTextBlob::makeOp( const Run::SubRunInfo& info, int glyphCount, int run, int subRun, const SkMatrix& viewMatrix, SkScalar x, SkScalar y, const GrTextUtils::Paint& paint, const SkSurfaceProps& props, const GrDistanceFieldAdjustTable* distanceAdjustTable, @@ -304,12 +304,12 @@ inline void GrAtlasTextBlob::flushRun(GrRenderTargetContext* rtc, const GrClip& continue; } - std::unique_ptr op(this->makeOp(info, glyphCount, run, subRun, viewMatrix, x, y, - paint, props, distanceAdjustTable, - rtc->isGammaCorrect(), cache)); + std::unique_ptr op(this->makeOp(info, glyphCount, run, subRun, viewMatrix, x, + y, paint, props, distanceAdjustTable, + rtc->isGammaCorrect(), cache)); GrPipelineBuilder pipelineBuilder(std::move(grPaint), GrAAType::kNone); - rtc->addDrawOp(pipelineBuilder, clip, std::move(op)); + rtc->addMeshDrawOp(pipelineBuilder, clip, std::move(op)); } } @@ -424,7 +424,7 @@ void GrAtlasTextBlob::flushThrowaway(GrContext* context, GrRenderTargetContext* this->flushBigGlyphs(context, rtc, clip, paint, viewMatrix, x, y, clipBounds); } -std::unique_ptr GrAtlasTextBlob::test_makeOp( +std::unique_ptr GrAtlasTextBlob::test_makeOp( int glyphCount, int run, int subRun, const SkMatrix& viewMatrix, SkScalar x, SkScalar y, const GrTextUtils::Paint& paint, const SkSurfaceProps& props, const GrDistanceFieldAdjustTable* distanceAdjustTable, GrAtlasGlyphCache* cache) { -- cgit v1.2.3