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

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

Issue 488563003: Remove skip draw check in GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « 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 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 SkASSERT(NULL != are); 1746 SkASSERT(NULL != are);
1747 SkASSERT(NULL != acf); 1747 SkASSERT(NULL != acf);
1748 are->set(fDrawState); 1748 are->set(fDrawState);
1749 fDrawState->setFromPaint(*paint, fViewMatrix, fRenderTarget.get()); 1749 fDrawState->setFromPaint(*paint, fViewMatrix, fRenderTarget.get());
1750 #if GR_DEBUG_PARTIAL_COVERAGE_CHECK 1750 #if GR_DEBUG_PARTIAL_COVERAGE_CHECK
1751 if ((paint->hasMask() || 0xff != paint->fCoverage) && 1751 if ((paint->hasMask() || 0xff != paint->fCoverage) &&
1752 !fDrawState->couldApplyCoverage(fGpu->caps())) { 1752 !fDrawState->couldApplyCoverage(fGpu->caps())) {
1753 GrPrintf("Partial pixel coverage will be incorrectly blended.\n"); 1753 GrPrintf("Partial pixel coverage will be incorrectly blended.\n");
1754 } 1754 }
1755 #endif 1755 #endif
1756 if (fDrawState->getBlendOpts() & GrDrawState::kSkipDraw_BlendOptFlag) {
1757 are->set(NULL);
1758 return NULL;
1759 }
1760 // Clear any vertex attributes configured for the previous use of the 1756 // Clear any vertex attributes configured for the previous use of the
1761 // GrDrawState which can effect which blend optimizations are in effect. 1757 // GrDrawState which can effect which blend optimizations are in effect.
1762 fDrawState->setDefaultVertexAttribs(); 1758 fDrawState->setDefaultVertexAttribs();
1763 } else { 1759 } else {
1764 fDrawState->reset(fViewMatrix); 1760 fDrawState->reset(fViewMatrix);
1765 fDrawState->setRenderTarget(fRenderTarget.get()); 1761 fDrawState->setRenderTarget(fRenderTarget.get());
1766 } 1762 }
1767 GrDrawTarget* target; 1763 GrDrawTarget* target;
1768 if (kYes_BufferedDraw == buffered) { 1764 if (kYes_BufferedDraw == buffered) {
1769 fLastDrawWasBuffered = kYes_BufferedDraw; 1765 fLastDrawWasBuffered = kYes_BufferedDraw;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 fDrawBuffer->removeGpuTraceMarker(marker); 1942 fDrawBuffer->removeGpuTraceMarker(marker);
1947 } 1943 }
1948 } 1944 }
1949 1945
1950 /////////////////////////////////////////////////////////////////////////////// 1946 ///////////////////////////////////////////////////////////////////////////////
1951 #if GR_CACHE_STATS 1947 #if GR_CACHE_STATS
1952 void GrContext::printCacheStats() const { 1948 void GrContext::printCacheStats() const {
1953 fResourceCache->printStats(); 1949 fResourceCache->printStats();
1954 } 1950 }
1955 #endif 1951 #endif
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