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

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

Issue 509153002: Initial change to create GeometryProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: last warning 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 | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrDrawState.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 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 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 return true; 1731 return true;
1732 } 1732 }
1733 //////////////////////////////////////////////////////////////////////////////// 1733 ////////////////////////////////////////////////////////////////////////////////
1734 1734
1735 GrDrawTarget* GrContext::prepareToDraw(const GrPaint* paint, 1735 GrDrawTarget* GrContext::prepareToDraw(const GrPaint* paint,
1736 BufferedDraw buffered, 1736 BufferedDraw buffered,
1737 AutoRestoreEffects* are, 1737 AutoRestoreEffects* are,
1738 AutoCheckFlush* acf) { 1738 AutoCheckFlush* acf) {
1739 // All users of this draw state should be freeing up all effects when they'r e done. 1739 // All users of this draw state should be freeing up all effects when they'r e done.
1740 // Otherwise effects that own resources may keep those resources alive indef initely. 1740 // Otherwise effects that own resources may keep those resources alive indef initely.
1741 SkASSERT(0 == fDrawState->numColorStages() && 0 == fDrawState->numCoverageSt ages()); 1741 SkASSERT(0 == fDrawState->numColorStages() && 0 == fDrawState->numCoverageSt ages() &&
1742 !fDrawState->hasGeometryProcessor());
1742 1743
1743 if (NULL == fGpu) { 1744 if (NULL == fGpu) {
1744 return NULL; 1745 return NULL;
1745 } 1746 }
1746 1747
1747 if (kNo_BufferedDraw == buffered && kYes_BufferedDraw == fLastDrawWasBuffere d) { 1748 if (kNo_BufferedDraw == buffered && kYes_BufferedDraw == fLastDrawWasBuffere d) {
1748 fDrawBuffer->flush(); 1749 fDrawBuffer->flush();
1749 fLastDrawWasBuffered = kNo_BufferedDraw; 1750 fLastDrawWasBuffered = kNo_BufferedDraw;
1750 } 1751 }
1751 ASSERT_OWNED_RESOURCE(fRenderTarget.get()); 1752 ASSERT_OWNED_RESOURCE(fRenderTarget.get());
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 fDrawBuffer->removeGpuTraceMarker(marker); 1950 fDrawBuffer->removeGpuTraceMarker(marker);
1950 } 1951 }
1951 } 1952 }
1952 1953
1953 /////////////////////////////////////////////////////////////////////////////// 1954 ///////////////////////////////////////////////////////////////////////////////
1954 #if GR_CACHE_STATS 1955 #if GR_CACHE_STATS
1955 void GrContext::printCacheStats() const { 1956 void GrContext::printCacheStats() const {
1956 fResourceCache->printStats(); 1957 fResourceCache->printStats();
1957 } 1958 }
1958 #endif 1959 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698