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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 1279303002: Expand functionality of GrRectBatchFactory with AARects (Closed) Base URL: https://skia.googlesource.com/skia.git@batchfactory3
Patch Set: tweaks Created 5 years, 4 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/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawContext.cpp
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index f86e7834f0dc06bec6bda1ccfab5879fa71189dc..6aa45a10a5fb038d8b493d4aecbdd5f8dcd056f0 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -6,7 +6,6 @@
* found in the LICENSE file.
*/
-#include "GrAARectRenderer.h"
#include "GrAtlasTextContext.h"
#include "GrBatchTest.h"
#include "GrColor.h"
@@ -308,23 +307,14 @@ void GrDrawContext::drawRect(GrRenderTarget* rt,
width, viewMatrix, color);
if (doAA) {
+ SkAutoTUnref<GrBatch> batch;
if (width >= 0) {
- GrAARectRenderer::StrokeAARect(fDrawTarget,
- pipelineBuilder,
- color,
- viewMatrix,
- rect,
- devBoundRect,
- *strokeInfo);
+ batch.reset(GrRectBatchFactory::CreateStrokeAA(color, viewMatrix, rect, devBoundRect,
+ *strokeInfo));
} else {
- // filled AA rect
- GrAARectRenderer::FillAARect(fDrawTarget,
- pipelineBuilder,
- color,
- viewMatrix,
- rect,
- devBoundRect);
+ batch.reset(GrRectBatchFactory::CreateFillAA(color, viewMatrix, rect, devBoundRect));
}
+ fDrawTarget->drawBatch(pipelineBuilder, batch);
return;
}
@@ -702,8 +692,10 @@ void GrDrawContext::drawPath(GrRenderTarget* rt,
SkRect rects[2];
if (is_nested_rects(viewMatrix, path, strokeInfo, rects)) {
- GrAARectRenderer::FillAANestedRects(fDrawTarget, pipelineBuilder, color,
- viewMatrix, rects);
+ SkAutoTUnref<GrBatch> batch(GrRectBatchFactory::CreateFillNestedRectsAA(color,
+ viewMatrix,
+ rects));
+ fDrawTarget->drawBatch(pipelineBuilder, batch);
return;
}
}
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698