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

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

Issue 446953002: Add an opaqueness hint to GrDrawState. (Closed) Base URL: https://skia.googlesource.com/skia.git@greg
Patch Set: Address comments Created 6 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 | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrDistanceFieldTextContext.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 /* 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 fLastDrawWasBuffered = kNo_BufferedDraw; 1746 fLastDrawWasBuffered = kNo_BufferedDraw;
1747 } 1747 }
1748 ASSERT_OWNED_RESOURCE(fRenderTarget.get()); 1748 ASSERT_OWNED_RESOURCE(fRenderTarget.get());
1749 if (NULL != paint) { 1749 if (NULL != paint) {
1750 SkASSERT(NULL != are); 1750 SkASSERT(NULL != are);
1751 SkASSERT(NULL != acf); 1751 SkASSERT(NULL != acf);
1752 are->set(fDrawState); 1752 are->set(fDrawState);
1753 fDrawState->setFromPaint(*paint, fViewMatrix, fRenderTarget.get()); 1753 fDrawState->setFromPaint(*paint, fViewMatrix, fRenderTarget.get());
1754 #if GR_DEBUG_PARTIAL_COVERAGE_CHECK 1754 #if GR_DEBUG_PARTIAL_COVERAGE_CHECK
1755 if ((paint->hasMask() || 0xff != paint->fCoverage) && 1755 if ((paint->hasMask() || 0xff != paint->fCoverage) &&
1756 !fGpu->canApplyCoverage()) { 1756 !fDrawState->couldApplyCoverage(fGpu->caps())) {
1757 GrPrintf("Partial pixel coverage will be incorrectly blended.\n"); 1757 GrPrintf("Partial pixel coverage will be incorrectly blended.\n");
1758 } 1758 }
1759 #endif 1759 #endif
1760 if (fDrawState->getBlendOpts() & GrDrawState::kSkipDraw_BlendOptFlag) { 1760 if (fDrawState->getBlendOpts() & GrDrawState::kSkipDraw_BlendOptFlag) {
1761 are->set(NULL); 1761 are->set(NULL);
1762 return NULL; 1762 return NULL;
1763 } 1763 }
1764 } else { 1764 } else {
1765 fDrawState->reset(fViewMatrix); 1765 fDrawState->reset(fViewMatrix);
1766 fDrawState->setRenderTarget(fRenderTarget.get()); 1766 fDrawState->setRenderTarget(fRenderTarget.get());
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1947 fDrawBuffer->removeGpuTraceMarker(marker); 1947 fDrawBuffer->removeGpuTraceMarker(marker);
1948 } 1948 }
1949 } 1949 }
1950 1950
1951 /////////////////////////////////////////////////////////////////////////////// 1951 ///////////////////////////////////////////////////////////////////////////////
1952 #if GR_CACHE_STATS 1952 #if GR_CACHE_STATS
1953 void GrContext::printCacheStats() const { 1953 void GrContext::printCacheStats() const {
1954 fResourceCache->printStats(); 1954 fResourceCache->printStats();
1955 } 1955 }
1956 #endif 1956 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698