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

Side by Side Diff: src/gpu/GrOvalRenderer.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/GrDrawTarget.cpp ('k') | src/gpu/GrSWMaskHelper.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 2013 Google Inc. 2 * Copyright 2013 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 "GrOvalRenderer.h" 8 #include "GrOvalRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
11 #include "GrBatchTest.h" 11 #include "GrBatchTest.h"
12 #include "GrDrawTarget.h" 12 #include "GrDrawTarget.h"
13 #include "GrGeometryProcessor.h" 13 #include "GrGeometryProcessor.h"
14 #include "GrInvariantOutput.h" 14 #include "GrInvariantOutput.h"
15 #include "GrPipelineBuilder.h" 15 #include "GrPipelineBuilder.h"
16 #include "GrProcessor.h" 16 #include "GrProcessor.h"
17 #include "GrResourceProvider.h" 17 #include "GrResourceProvider.h"
18 #include "GrVertexBuffer.h" 18 #include "GrVertexBuffer.h"
19 #include "SkRRect.h" 19 #include "SkRRect.h"
20 #include "SkStrokeRec.h" 20 #include "SkStrokeRec.h"
21 #include "SkTLazy.h" 21 #include "SkTLazy.h"
22 #include "batches/GrRectBatchFactory.h"
22 #include "batches/GrVertexBatch.h" 23 #include "batches/GrVertexBatch.h"
23 #include "effects/GrRRectEffect.h" 24 #include "effects/GrRRectEffect.h"
24 #include "glsl/GrGLSLFragmentShaderBuilder.h" 25 #include "glsl/GrGLSLFragmentShaderBuilder.h"
25 #include "glsl/GrGLSLGeometryProcessor.h" 26 #include "glsl/GrGLSLGeometryProcessor.h"
26 #include "glsl/GrGLSLProgramDataManager.h" 27 #include "glsl/GrGLSLProgramDataManager.h"
27 #include "glsl/GrGLSLVarying.h" 28 #include "glsl/GrGLSLVarying.h"
28 #include "glsl/GrGLSLVertexShaderBuilder.h" 29 #include "glsl/GrGLSLVertexShaderBuilder.h"
29 #include "glsl/GrGLSLUniformHandler.h" 30 #include "glsl/GrGLSLUniformHandler.h"
30 #include "glsl/GrGLSLUtil.h" 31 #include "glsl/GrGLSLUtil.h"
31 32
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 SkMatrix invert; 1487 SkMatrix invert;
1487 if (!viewMatrix.invert(&invert)) { 1488 if (!viewMatrix.invert(&invert)) {
1488 return false; 1489 return false;
1489 } 1490 }
1490 1491
1491 arfps.addCoverageFragmentProcessor(effect)->unref(); 1492 arfps.addCoverageFragmentProcessor(effect)->unref();
1492 SkRect bounds = outer->getBounds(); 1493 SkRect bounds = outer->getBounds();
1493 if (applyAA) { 1494 if (applyAA) {
1494 bounds.outset(SK_ScalarHalf, SK_ScalarHalf); 1495 bounds.outset(SK_ScalarHalf, SK_ScalarHalf);
1495 } 1496 }
1496 target->drawNonAARect(pipelineBuilder, color, SkMatrix::I(), bounds, invert) ; 1497 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(color, S kMatrix::I(),
1498 bounds, nullptr, &invert));
1499 target->drawBatch(pipelineBuilder, batch);
1497 return true; 1500 return true;
1498 } 1501 }
1499 1502
1500 //////////////////////////////////////////////////////////////////////////////// /////////////////// 1503 //////////////////////////////////////////////////////////////////////////////// ///////////////////
1501 1504
1502 class RRectCircleRendererBatch : public GrVertexBatch { 1505 class RRectCircleRendererBatch : public GrVertexBatch {
1503 public: 1506 public:
1504 DEFINE_BATCH_CLASS_ID 1507 DEFINE_BATCH_CLASS_ID
1505 1508
1506 struct Geometry { 1509 struct Geometry {
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 } 2083 }
2081 2084
2082 DRAW_BATCH_TEST_DEFINE(RRectBatch) { 2085 DRAW_BATCH_TEST_DEFINE(RRectBatch) {
2083 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random); 2086 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random);
2084 GrColor color = GrRandomColor(random); 2087 GrColor color = GrRandomColor(random);
2085 const SkRRect& rrect = GrTest::TestRRectSimple(random); 2088 const SkRRect& rrect = GrTest::TestRRectSimple(random);
2086 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra ndom)); 2089 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra ndom));
2087 } 2090 }
2088 2091
2089 #endif 2092 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698