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

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

Issue 1287973003: Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment 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 | « include/gpu/GrXferProcessor.h ('k') | 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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 private: 933 private:
934 AAConvexPathBatch(const Geometry& geometry) { 934 AAConvexPathBatch(const Geometry& geometry) {
935 this->initClassID<AAConvexPathBatch>(); 935 this->initClassID<AAConvexPathBatch>();
936 fGeoData.push_back(geometry); 936 fGeoData.push_back(geometry);
937 937
938 // compute bounds 938 // compute bounds
939 fBounds = geometry.fPath.getBounds(); 939 fBounds = geometry.fPath.getBounds();
940 geometry.fViewMatrix.mapRect(&fBounds); 940 geometry.fViewMatrix.mapRect(&fBounds);
941 } 941 }
942 942
943 bool onCombineIfPossible(GrBatch* t) override { 943 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
944 if (!this->pipeline()->isEqual(*t->pipeline())) { 944 if (!GrPipeline::CanCombine(*this->pipeline(), this->bounds(), *t->pipel ine(), t->bounds(),
945 caps)) {
945 return false; 946 return false;
946 } 947 }
947 948
948 AAConvexPathBatch* that = t->cast<AAConvexPathBatch>(); 949 AAConvexPathBatch* that = t->cast<AAConvexPathBatch>();
949 950
950 if (this->color() != that->color()) { 951 if (this->color() != that->color()) {
951 return false; 952 return false;
952 } 953 }
953 954
954 SkASSERT(this->usesLocalCoords() == that->usesLocalCoords()); 955 SkASSERT(this->usesLocalCoords() == that->usesLocalCoords());
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 BATCH_TEST_DEFINE(AAConvexPathBatch) { 1016 BATCH_TEST_DEFINE(AAConvexPathBatch) {
1016 AAConvexPathBatch::Geometry geometry; 1017 AAConvexPathBatch::Geometry geometry;
1017 geometry.fColor = GrRandomColor(random); 1018 geometry.fColor = GrRandomColor(random);
1018 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 1019 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
1019 geometry.fPath = GrTest::TestPathConvex(random); 1020 geometry.fPath = GrTest::TestPathConvex(random);
1020 1021
1021 return AAConvexPathBatch::Create(geometry); 1022 return AAConvexPathBatch::Create(geometry);
1022 } 1023 }
1023 1024
1024 #endif 1025 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrXferProcessor.h ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698