OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrPLSPathRenderer.h" | 8 #include "GrPLSPathRenderer.h" |
9 | 9 |
10 #include "SkChunkAlloc.h" | 10 #include "SkChunkAlloc.h" |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 return true; | 978 return true; |
979 } | 979 } |
980 SkASSERT(!inPLSDraw); | 980 SkASSERT(!inPLSDraw); |
981 SkDEBUGCODE(inPLSDraw = true;) | 981 SkDEBUGCODE(inPLSDraw = true;) |
982 PLSPathBatch::Geometry geometry; | 982 PLSPathBatch::Geometry geometry; |
983 geometry.fColor = args.fColor; | 983 geometry.fColor = args.fColor; |
984 geometry.fViewMatrix = *args.fViewMatrix; | 984 geometry.fViewMatrix = *args.fViewMatrix; |
985 geometry.fPath = *args.fPath; | 985 geometry.fPath = *args.fPath; |
986 | 986 |
987 SkAutoTUnref<GrDrawBatch> batch(PLSPathBatch::Create(geometry)); | 987 SkAutoTUnref<GrDrawBatch> batch(PLSPathBatch::Create(geometry)); |
988 args.fTarget->drawBatch(*args.fPipelineBuilder, batch); | 988 args.fTarget->drawBatch(*args.fPipelineBuilder, *args.fClip, batch); |
989 | 989 |
990 SkDEBUGCODE(inPLSDraw = false;) | 990 SkDEBUGCODE(inPLSDraw = false;) |
991 return true; | 991 return true; |
992 | 992 |
993 } | 993 } |
994 | 994 |
995 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 995 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
996 | 996 |
997 #ifdef GR_TEST_UTILS | 997 #ifdef GR_TEST_UTILS |
998 | 998 |
999 DRAW_BATCH_TEST_DEFINE(PLSPathBatch) { | 999 DRAW_BATCH_TEST_DEFINE(PLSPathBatch) { |
1000 PLSPathBatch::Geometry geometry; | 1000 PLSPathBatch::Geometry geometry; |
1001 geometry.fColor = GrRandomColor(random); | 1001 geometry.fColor = GrRandomColor(random); |
1002 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); | 1002 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); |
1003 geometry.fPath = GrTest::TestPathConvex(random); | 1003 geometry.fPath = GrTest::TestPathConvex(random); |
1004 | 1004 |
1005 return PLSPathBatch::Create(geometry); | 1005 return PLSPathBatch::Create(geometry); |
1006 } | 1006 } |
1007 | 1007 |
1008 #endif | 1008 #endif |
OLD | NEW |