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

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

Issue 1156103006: Unblock DEPS roll by remove SkAutoTUnref from GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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/GrContext.cpp ('k') | no next file » | 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 2015 Google Inc. 3 * Copyright 2015 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 "GrAARectRenderer.h" 9 #include "GrAARectRenderer.h"
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 15 matching lines...) Expand all
26 26
27 private: 27 private:
28 GrContext* fContext; 28 GrContext* fContext;
29 }; 29 };
30 30
31 GrDrawContext::GrDrawContext(GrContext* context, GrDrawTarget* drawTarget) 31 GrDrawContext::GrDrawContext(GrContext* context, GrDrawTarget* drawTarget)
32 : fContext(context) 32 : fContext(context)
33 , fDrawTarget(SkRef(drawTarget)) { 33 , fDrawTarget(SkRef(drawTarget)) {
34 } 34 }
35 35
36 GrDrawContext::~GrDrawContext() {
37 SkSafeUnref(fDrawTarget);
38 }
39
36 void GrDrawContext::copySurface(GrRenderTarget* dst, GrSurface* src, 40 void GrDrawContext::copySurface(GrRenderTarget* dst, GrSurface* src,
37 const SkIRect& srcRect, const SkIPoint& dstPoint ) { 41 const SkIRect& srcRect, const SkIPoint& dstPoint ) {
38 if (!this->prepareToDraw(dst)) { 42 if (!this->prepareToDraw(dst)) {
39 return; 43 return;
40 } 44 }
41 45
42 fDrawTarget->copySurface(dst, src, srcRect, dstPoint); 46 fDrawTarget->copySurface(dst, src, srcRect, dstPoint);
43 } 47 }
44 48
45 void GrDrawContext::drawText(GrPipelineBuilder* pipelineBuilder, GrBatch* batch) { 49 void GrDrawContext::drawText(GrPipelineBuilder* pipelineBuilder, GrBatch* batch) {
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 return DrawVerticesBatch::Create(geometry, type, viewMatrix, 1266 return DrawVerticesBatch::Create(geometry, type, viewMatrix,
1263 positions.begin(), vertexCount, 1267 positions.begin(), vertexCount,
1264 indices.begin(), hasIndices ? vertexCount : 0, 1268 indices.begin(), hasIndices ? vertexCount : 0,
1265 colors.begin(), 1269 colors.begin(),
1266 texCoords.begin(), 1270 texCoords.begin(),
1267 bounds); 1271 bounds);
1268 } 1272 }
1269 1273
1270 #endif 1274 #endif
1271 1275
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698