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

Side by Side Diff: src/gpu/GrSWMaskHelper.cpp

Issue 1584703003: Remove two varieties of drawNonAARect from GrDrawTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@hidedrawtargetabit
Patch Set: deprecation message on GrTest Created 4 years, 11 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/GrOvalRenderer.cpp ('k') | src/gpu/GrSoftwarePathRenderer.cpp » ('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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrSWMaskHelper.h" 8 #include "GrSWMaskHelper.h"
9 9
10 #include "GrPipelineBuilder.h"
11 #include "GrCaps.h" 10 #include "GrCaps.h"
12 #include "GrDrawTarget.h" 11 #include "GrDrawTarget.h"
13 #include "GrGpu.h" 12 #include "GrGpu.h"
13 #include "GrPipelineBuilder.h"
14 14
15 #include "SkData.h" 15 #include "SkData.h"
16 #include "SkDistanceFieldGen.h" 16 #include "SkDistanceFieldGen.h"
17 #include "SkStrokeRec.h" 17 #include "SkStrokeRec.h"
18 18
19 // TODO: try to remove this #include 19 #include "batches/GrRectBatchFactory.h"
20 #include "GrContext.h"
21 20
22 namespace { 21 namespace {
23 22
24 /* 23 /*
25 * Convert a boolean operation into a transfer mode code 24 * Convert a boolean operation into a transfer mode code
26 */ 25 */
27 SkXfermode::Mode op_to_mode(SkRegion::Op op) { 26 SkXfermode::Mode op_to_mode(SkRegion::Op op) {
28 27
29 static const SkXfermode::Mode modeMap[] = { 28 static const SkXfermode::Mode modeMap[] = {
30 SkXfermode::kDstOut_Mode, // kDifference_Op 29 SkXfermode::kDstOut_Mode, // kDifference_Op
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 SkMatrix maskMatrix; 364 SkMatrix maskMatrix;
366 maskMatrix.setIDiv(texture->width(), texture->height()); 365 maskMatrix.setIDiv(texture->width(), texture->height());
367 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop )); 366 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop ));
368 367
369 pipelineBuilder->addCoverageFragmentProcessor( 368 pipelineBuilder->addCoverageFragmentProcessor(
370 GrSimpleTextureEffect::Create(texture, 369 GrSimpleTextureEffect::Create(texture,
371 maskMatrix, 370 maskMatrix,
372 GrTextureParams::kNone_Fi lterMode, 371 GrTextureParams::kNone_Fi lterMode,
373 kDevice_GrCoordSet))->unr ef(); 372 kDevice_GrCoordSet))->unr ef();
374 373
375 target->drawNonAARect(*pipelineBuilder, color, SkMatrix::I(), dstRect, inver t); 374 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(color, S kMatrix::I(),
375 dstRect, nullptr, &invert));
376 target->drawBatch(*pipelineBuilder, batch);
376 } 377 }
OLDNEW
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrSoftwarePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698