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

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

Issue 1242033002: All batches do their own pipeline compare (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add quick accept to pipeline compare Created 5 years, 5 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 | « no previous file | src/gpu/GrAADistanceFieldPathRenderer.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 "GrAAConvexPathRenderer.h" 9 #include "GrAAConvexPathRenderer.h"
10 10
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 AAConvexPathBatch(const Geometry& geometry) { 931 AAConvexPathBatch(const Geometry& geometry) {
932 this->initClassID<AAConvexPathBatch>(); 932 this->initClassID<AAConvexPathBatch>();
933 fGeoData.push_back(geometry); 933 fGeoData.push_back(geometry);
934 934
935 // compute bounds 935 // compute bounds
936 fBounds = geometry.fPath.getBounds(); 936 fBounds = geometry.fPath.getBounds();
937 geometry.fViewMatrix.mapRect(&fBounds); 937 geometry.fViewMatrix.mapRect(&fBounds);
938 } 938 }
939 939
940 bool onCombineIfPossible(GrBatch* t) override { 940 bool onCombineIfPossible(GrBatch* t) override {
941 if (!this->pipeline()->isEqual(*t->pipeline())) {
942 return false;
943 }
944
941 AAConvexPathBatch* that = t->cast<AAConvexPathBatch>(); 945 AAConvexPathBatch* that = t->cast<AAConvexPathBatch>();
942 946
943 if (this->color() != that->color()) { 947 if (this->color() != that->color()) {
944 return false; 948 return false;
945 } 949 }
946 950
947 SkASSERT(this->usesLocalCoords() == that->usesLocalCoords()); 951 SkASSERT(this->usesLocalCoords() == that->usesLocalCoords());
948 if (this->usesLocalCoords() && !this->viewMatrix().cheapEqualTo(that->vi ewMatrix())) { 952 if (this->usesLocalCoords() && !this->viewMatrix().cheapEqualTo(that->vi ewMatrix())) {
949 return false; 953 return false;
950 } 954 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 BATCH_TEST_DEFINE(AAConvexPathBatch) { 1018 BATCH_TEST_DEFINE(AAConvexPathBatch) {
1015 AAConvexPathBatch::Geometry geometry; 1019 AAConvexPathBatch::Geometry geometry;
1016 geometry.fColor = GrRandomColor(random); 1020 geometry.fColor = GrRandomColor(random);
1017 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 1021 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
1018 geometry.fPath = GrTest::TestPathConvex(random); 1022 geometry.fPath = GrTest::TestPathConvex(random);
1019 1023
1020 return AAConvexPathBatch::Create(geometry); 1024 return AAConvexPathBatch::Create(geometry);
1021 } 1025 }
1022 1026
1023 #endif 1027 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698