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

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

Issue 700483003: Revert changes to GrContext::resolveRenderTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | 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 2011 Google Inc. 3 * Copyright 2011 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 "GrContext.h" 9 #include "GrContext.h"
10 10
(...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 srcPI.fRowBytes = rowBytes; 1530 srcPI.fRowBytes = rowBytes;
1531 1531
1532 return srcPI.convertPixelsTo(&dstPI, width, height); 1532 return srcPI.convertPixelsTo(&dstPI, width, height);
1533 } 1533 }
1534 return true; 1534 return true;
1535 } 1535 }
1536 1536
1537 void GrContext::resolveRenderTarget(GrRenderTarget* target) { 1537 void GrContext::resolveRenderTarget(GrRenderTarget* target) {
1538 SkASSERT(target); 1538 SkASSERT(target);
1539 ASSERT_OWNED_RESOURCE(target); 1539 ASSERT_OWNED_RESOURCE(target);
1540 if (!target->needsResolve()) { 1540 this->flush();
1541 return;
1542 }
1543 if (target->surfacePriv().hasPendingIO()) {
1544 this->flush();
1545 }
1546 if (fGpu) { 1541 if (fGpu) {
1547 fGpu->resolveRenderTarget(target); 1542 fGpu->resolveRenderTarget(target);
1548 } 1543 }
1549 } 1544 }
1550 1545
1551 void GrContext::discardRenderTarget(GrRenderTarget* renderTarget) { 1546 void GrContext::discardRenderTarget(GrRenderTarget* renderTarget) {
1552 SkASSERT(renderTarget); 1547 SkASSERT(renderTarget);
1553 ASSERT_OWNED_RESOURCE(renderTarget); 1548 ASSERT_OWNED_RESOURCE(renderTarget);
1554 AutoRestoreEffects are; 1549 AutoRestoreEffects are;
1555 AutoCheckFlush acf(this); 1550 AutoCheckFlush acf(this);
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 fResourceCache->printStats(); 1779 fResourceCache->printStats();
1785 } 1780 }
1786 #endif 1781 #endif
1787 1782
1788 #if GR_GPU_STATS 1783 #if GR_GPU_STATS
1789 const GrContext::GPUStats* GrContext::gpuStats() const { 1784 const GrContext::GPUStats* GrContext::gpuStats() const {
1790 return fGpu->gpuStats(); 1785 return fGpu->gpuStats();
1791 } 1786 }
1792 #endif 1787 #endif
1793 1788
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698