| Index: src/gpu/GrDrawContext.cpp
|
| diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
|
| index 2613407417ffedab21798ff6c640429c1d3374ff..6718699c9a293bac706e87d2dfaec30faf85cc32 100644
|
| --- a/src/gpu/GrDrawContext.cpp
|
| +++ b/src/gpu/GrDrawContext.cpp
|
| @@ -23,6 +23,7 @@
|
| #include "batches/GrDrawAtlasBatch.h"
|
| #include "batches/GrDrawVerticesBatch.h"
|
| #include "batches/GrRectBatchFactory.h"
|
| +#include "batches/GrNinePatch.h" // TODO Factory
|
|
|
| #define ASSERT_OWNED_RESOURCE(R) SkASSERT(!(R) || (R)->getContext() == fDrawingManager->getContext())
|
| #define RETURN_IF_ABANDONED if (fDrawingManager->abandoned()) { return; }
|
| @@ -568,6 +569,27 @@ void GrDrawContext::drawOval(const GrClip& clip,
|
| }
|
| }
|
|
|
| +void GrDrawContext::drawImageNine(const GrClip& clip,
|
| + const GrPaint& paint,
|
| + const SkMatrix& viewMatrix,
|
| + int imageWidth,
|
| + int imageHeight,
|
| + const SkIRect& center,
|
| + const SkRect& dst) {
|
| + RETURN_IF_ABANDONED
|
| + SkDEBUGCODE(this->validate();)
|
| +
|
| + AutoCheckFlush acf(fDrawingManager);
|
| +
|
| + SkAutoTUnref<GrDrawBatch> batch(GrNinePatch::CreateNonAA(paint.getColor(), viewMatrix,
|
| + imageWidth, imageHeight,
|
| + center, dst));
|
| +
|
| + GrPipelineBuilder pipelineBuilder(paint, fRenderTarget, clip);
|
| + this->getDrawTarget()->drawBatch(pipelineBuilder, batch);
|
| +}
|
| +
|
| +
|
| // Can 'path' be drawn as a pair of filled nested rectangles?
|
| static bool is_nested_rects(const SkMatrix& viewMatrix,
|
| const SkPath& path,
|
|
|