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

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

Issue 2182543003: Move prepareForExternalIO from GrRenderTarget to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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/GrSurface.h ('k') | src/gpu/GrSurface.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 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 "GrBatchTest.h" 8 #include "GrBatchTest.h"
9 #include "GrColor.h" 9 #include "GrColor.h"
10 #include "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 AutoCheckFlush acf(fDrawingManager); 973 AutoCheckFlush acf(fDrawingManager);
974 974
975 SkAutoTUnref<GrDrawBatch> batch(GrNinePatch::CreateNonAA(paint.getColor(), v iewMatrix, 975 SkAutoTUnref<GrDrawBatch> batch(GrNinePatch::CreateNonAA(paint.getColor(), v iewMatrix,
976 imageWidth, imageHe ight, 976 imageWidth, imageHe ight,
977 center, dst)); 977 center, dst));
978 978
979 GrPipelineBuilder pipelineBuilder(paint, this->mustUseHWAA(paint)); 979 GrPipelineBuilder pipelineBuilder(paint, this->mustUseHWAA(paint));
980 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); 980 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
981 } 981 }
982 982
983 void GrDrawContext::prepareForExternalIO() {
984 ASSERT_SINGLE_OWNER
985 RETURN_IF_ABANDONED
986 SkDEBUGCODE(this->validate();)
987 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::prepareForExternalIO" );
988
989 ASSERT_OWNED_RESOURCE(fRenderTarget);
990
991 fDrawingManager->getContext()->prepareSurfaceForExternalIO(fRenderTarget.get ());
992 }
983 993
984 void GrDrawContext::drawNonAAFilledRect(const GrClip& clip, 994 void GrDrawContext::drawNonAAFilledRect(const GrClip& clip,
985 const GrPaint& paint, 995 const GrPaint& paint,
986 const SkMatrix& viewMatrix, 996 const SkMatrix& viewMatrix,
987 const SkRect& rect, 997 const SkRect& rect,
988 const SkRect* localRect, 998 const SkRect* localRect,
989 const SkMatrix* localMatrix, 999 const SkMatrix* localMatrix,
990 const GrUserStencilSettings* ss) { 1000 const GrUserStencilSettings* ss) {
991 SkAutoTUnref<GrDrawBatch> batch( 1001 SkAutoTUnref<GrDrawBatch> batch(
992 GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewMatrix, re ct, localRect, 1002 GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewMatrix, re ct, localRect,
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 1254
1245 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr Clip& clip, 1255 void GrDrawContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const Gr Clip& clip,
1246 GrDrawBatch* batch) { 1256 GrDrawBatch* batch) {
1247 ASSERT_SINGLE_OWNER 1257 ASSERT_SINGLE_OWNER
1248 RETURN_IF_ABANDONED 1258 RETURN_IF_ABANDONED
1249 SkDEBUGCODE(this->validate();) 1259 SkDEBUGCODE(this->validate();)
1250 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); 1260 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch");
1251 1261
1252 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch); 1262 this->getDrawTarget()->drawBatch(pipelineBuilder, this, clip, batch);
1253 } 1263 }
OLDNEW
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698