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

Side by Side Diff: src/gpu/GrDrawTarget.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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/batches/GrRectBatchFactory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrDrawTarget.h" 9 #include "GrDrawTarget.h"
10 10
11 #include "GrAARectRenderer.h"
12 #include "GrCaps.h" 11 #include "GrCaps.h"
13 #include "GrGpu.h" 12 #include "GrGpu.h"
14 #include "GrPath.h" 13 #include "GrPath.h"
15 #include "GrPipeline.h" 14 #include "GrPipeline.h"
16 #include "GrMemoryPool.h" 15 #include "GrMemoryPool.h"
17 #include "GrRenderTarget.h" 16 #include "GrRenderTarget.h"
18 #include "GrResourceProvider.h" 17 #include "GrResourceProvider.h"
19 #include "GrRenderTargetPriv.h" 18 #include "GrRenderTargetPriv.h"
20 #include "GrSurfacePriv.h" 19 #include "GrSurfacePriv.h"
21 #include "GrTexture.h" 20 #include "GrTexture.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 SkAutoTUnref<GrBatch> batch(GrRectBatchFactory::CreateFillBW(color, viewMatri x, rect, localRect, 296 SkAutoTUnref<GrBatch> batch(GrRectBatchFactory::CreateFillBW(color, viewMatri x, rect, localRect,
298 localMatrix)); 297 localMatrix));
299 this->drawBatch(pipelineBuilder, batch); 298 this->drawBatch(pipelineBuilder, batch);
300 } 299 }
301 300
302 void GrDrawTarget::drawAARect(const GrPipelineBuilder& pipelineBuilder, 301 void GrDrawTarget::drawAARect(const GrPipelineBuilder& pipelineBuilder,
303 GrColor color, 302 GrColor color,
304 const SkMatrix& viewMatrix, 303 const SkMatrix& viewMatrix,
305 const SkRect& rect, 304 const SkRect& rect,
306 const SkRect& devRect) { 305 const SkRect& devRect) {
307 GrAARectRenderer::FillAARect(this, pipelineBuilder, color, viewMatrix, rect, devRect); 306 SkAutoTUnref<GrBatch> batch(GrRectBatchFactory::CreateFillAA(color, viewMatr ix, rect, devRect));
307 this->drawBatch(pipelineBuilder, batch);
308 } 308 }
309 309
310 void GrDrawTarget::clear(const SkIRect* rect, 310 void GrDrawTarget::clear(const SkIRect* rect,
311 GrColor color, 311 GrColor color,
312 bool canIgnoreRect, 312 bool canIgnoreRect,
313 GrRenderTarget* renderTarget) { 313 GrRenderTarget* renderTarget) {
314 SkIRect rtRect = SkIRect::MakeWH(renderTarget->width(), renderTarget->height ()); 314 SkIRect rtRect = SkIRect::MakeWH(renderTarget->width(), renderTarget->height ());
315 SkIRect clippedRect; 315 SkIRect clippedRect;
316 if (!rect || 316 if (!rect ||
317 (canIgnoreRect && this->caps()->fullClearIsFree()) || 317 (canIgnoreRect && this->caps()->fullClearIsFree()) ||
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 ars, 517 ars,
518 scissorState, 518 scissorState,
519 devBounds); 519 devBounds);
520 } 520 }
521 521
522 void GrClipTarget::purgeResources() { 522 void GrClipTarget::purgeResources() {
523 // The clip mask manager can rebuild all its clip masks so just 523 // The clip mask manager can rebuild all its clip masks so just
524 // get rid of them all. 524 // get rid of them all.
525 fClipMaskManager->purgeResources(); 525 fClipMaskManager->purgeResources();
526 }; 526 };
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/batches/GrRectBatchFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698