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

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

Issue 1684313002: Make copySurface work for texture dsts, return a bool, & add unit test. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try again Created 4 years, 10 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') | src/gpu/GrDrawTarget.h » ('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 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 "GrBatchTest.h" 9 #include "GrBatchTest.h"
10 #include "GrColor.h" 10 #include "GrColor.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 ASSERT_SINGLE_OWNER 90 ASSERT_SINGLE_OWNER
91 SkDEBUGCODE(this->validate();) 91 SkDEBUGCODE(this->validate();)
92 92
93 if (!fDrawTarget || fDrawTarget->isClosed()) { 93 if (!fDrawTarget || fDrawTarget->isClosed()) {
94 fDrawTarget = fDrawingManager->newDrawTarget(fRenderTarget); 94 fDrawTarget = fDrawingManager->newDrawTarget(fRenderTarget);
95 } 95 }
96 96
97 return fDrawTarget; 97 return fDrawTarget;
98 } 98 }
99 99
100 void GrDrawContext::copySurface(GrSurface* src, const SkIRect& srcRect, const Sk IPoint& dstPoint) { 100 bool GrDrawContext::copySurface(GrSurface* src, const SkIRect& srcRect, const Sk IPoint& dstPoint) {
101 ASSERT_SINGLE_OWNER 101 ASSERT_SINGLE_OWNER
102 RETURN_IF_ABANDONED 102 RETURN_FALSE_IF_ABANDONED
103 SkDEBUGCODE(this->validate();) 103 SkDEBUGCODE(this->validate();)
104 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::copySurface"); 104 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::copySurface");
105 105
106 this->getDrawTarget()->copySurface(fRenderTarget, src, srcRect, dstPoint); 106 return this->getDrawTarget()->copySurface(fRenderTarget, src, srcRect, dstPo int);
107 } 107 }
108 108
109 void GrDrawContext::drawText(const GrClip& clip, const GrPaint& grPaint, 109 void GrDrawContext::drawText(const GrClip& clip, const GrPaint& grPaint,
110 const SkPaint& skPaint, 110 const SkPaint& skPaint,
111 const SkMatrix& viewMatrix, 111 const SkMatrix& viewMatrix,
112 const char text[], size_t byteLength, 112 const char text[], size_t byteLength,
113 SkScalar x, SkScalar y, const SkIRect& clipBounds) { 113 SkScalar x, SkScalar y, const SkIRect& clipBounds) {
114 ASSERT_SINGLE_OWNER 114 ASSERT_SINGLE_OWNER
115 RETURN_IF_ABANDONED 115 RETURN_IF_ABANDONED
116 SkDEBUGCODE(this->validate();) 116 SkDEBUGCODE(this->validate();)
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 } 847 }
848 848
849 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) { 849 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b atch) {
850 ASSERT_SINGLE_OWNER 850 ASSERT_SINGLE_OWNER
851 RETURN_IF_ABANDONED 851 RETURN_IF_ABANDONED
852 SkDEBUGCODE(this->validate();) 852 SkDEBUGCODE(this->validate();)
853 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch"); 853 GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawBatch");
854 854
855 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); 855 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch);
856 } 856 }
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698