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

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

Issue 19789006: Fix texture allocation in SWMaskHelper (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove more code Created 7 years, 5 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
« no previous file with comments | « no previous file | src/gpu/GrGpu.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 2012 Google Inc. 3 * Copyright 2012 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 "GrClipMaskManager.h" 9 #include "GrClipMaskManager.h"
10 #include "GrAAConvexPathRenderer.h" 10 #include "GrAAConvexPathRenderer.h"
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 // The other ops (union, xor, diff) only affect pixels inside 986 // The other ops (union, xor, diff) only affect pixels inside
987 // the geometry so they can just be drawn normally 987 // the geometry so they can just be drawn normally
988 if (Element::kRect_Type == element->getType()) { 988 if (Element::kRect_Type == element->getType()) {
989 helper.draw(element->getRect(), op, element->isAA(), 0xFF); 989 helper.draw(element->getRect(), op, element->isAA(), 0xFF);
990 } else { 990 } else {
991 GrAssert(Element::kPath_Type == element->getType()); 991 GrAssert(Element::kPath_Type == element->getType());
992 helper.draw(element->getPath(), stroke, op, element->isAA(), 0xFF); 992 helper.draw(element->getPath(), stroke, op, element->isAA(), 0xFF);
993 } 993 }
994 } 994 }
995 995
996 helper.toTexture(result, kAllIn_InitialState == initialState ? 0xFF : 0x00); 996 helper.toTexture(result);
997 997
998 fCurrClipMaskType = kAlpha_ClipMaskType; 998 fCurrClipMaskType = kAlpha_ClipMaskType;
999 return result; 999 return result;
1000 } 1000 }
1001 1001
1002 //////////////////////////////////////////////////////////////////////////////// 1002 ////////////////////////////////////////////////////////////////////////////////
1003 void GrClipMaskManager::releaseResources() { 1003 void GrClipMaskManager::releaseResources() {
1004 fAACache.releaseResources(); 1004 fAACache.releaseResources();
1005 } 1005 }
1006 1006
1007 void GrClipMaskManager::setGpu(GrGpu* gpu) { 1007 void GrClipMaskManager::setGpu(GrGpu* gpu) {
1008 fGpu = gpu; 1008 fGpu = gpu;
1009 fAACache.setContext(gpu->getContext()); 1009 fAACache.setContext(gpu->getContext());
1010 } 1010 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698