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

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

Issue 25023003: Implement color filter as GrGLEffect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 2 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 | Annotate | Revision Log
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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 return true; 1608 return true;
1609 } 1609 }
1610 //////////////////////////////////////////////////////////////////////////////// 1610 ////////////////////////////////////////////////////////////////////////////////
1611 1611
1612 GrDrawTarget* GrContext::prepareToDraw(const GrPaint* paint, 1612 GrDrawTarget* GrContext::prepareToDraw(const GrPaint* paint,
1613 BufferedDraw buffered, 1613 BufferedDraw buffered,
1614 AutoRestoreEffects* are, 1614 AutoRestoreEffects* are,
1615 AutoCheckFlush* acf) { 1615 AutoCheckFlush* acf) {
1616 // All users of this draw state should be freeing up all effects when they'r e done. 1616 // All users of this draw state should be freeing up all effects when they'r e done.
1617 // Otherwise effects that own resources may keep those resources alive indef initely. 1617 // Otherwise effects that own resources may keep those resources alive indef initely.
1618 SkASSERT(0 == fDrawState->numColorStages() && 0 == fDrawState->numCoverageSt ages()); 1618 SkASSERT(0 == fDrawState->totalStageCount());
1619 1619
1620 if (kNo_BufferedDraw == buffered && kYes_BufferedDraw == fLastDrawWasBuffere d) { 1620 if (kNo_BufferedDraw == buffered && kYes_BufferedDraw == fLastDrawWasBuffere d) {
1621 fDrawBuffer->flush(); 1621 fDrawBuffer->flush();
1622 fLastDrawWasBuffered = kNo_BufferedDraw; 1622 fLastDrawWasBuffered = kNo_BufferedDraw;
1623 } 1623 }
1624 ASSERT_OWNED_RESOURCE(fRenderTarget.get()); 1624 ASSERT_OWNED_RESOURCE(fRenderTarget.get());
1625 if (NULL != paint) { 1625 if (NULL != paint) {
1626 SkASSERT(NULL != are); 1626 SkASSERT(NULL != are);
1627 SkASSERT(NULL != acf); 1627 SkASSERT(NULL != acf);
1628 are->set(fDrawState); 1628 are->set(fDrawState);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 return NULL; 1772 return NULL;
1773 } 1773 }
1774 } 1774 }
1775 1775
1776 /////////////////////////////////////////////////////////////////////////////// 1776 ///////////////////////////////////////////////////////////////////////////////
1777 #if GR_CACHE_STATS 1777 #if GR_CACHE_STATS
1778 void GrContext::printCacheStats() const { 1778 void GrContext::printCacheStats() const {
1779 fTextureCache->printStats(); 1779 fTextureCache->printStats();
1780 } 1780 }
1781 #endif 1781 #endif
OLDNEW
« no previous file with comments | « src/effects/SkColorFilters.cpp ('k') | src/gpu/GrDrawState.h » ('j') | src/gpu/GrDrawState.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698