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

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

Issue 14890021: Remove isIRect "optimization" & defer computation of device Rect in AA rect rendering (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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 | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrContext.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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 switch (element->getType()) { 276 switch (element->getType()) {
277 case Element::kRect_Type: 277 case Element::kRect_Type:
278 // TODO: Do rects directly to the accumulator using a aa-rect GrEffe ct that covers the 278 // TODO: Do rects directly to the accumulator using a aa-rect GrEffe ct that covers the
279 // entire mask bounds and writes 0 outside the rect. 279 // entire mask bounds and writes 0 outside the rect.
280 if (element->isAA()) { 280 if (element->isAA()) {
281 getContext()->getAARectRenderer()->fillAARect(fGpu, 281 getContext()->getAARectRenderer()->fillAARect(fGpu,
282 fGpu, 282 fGpu,
283 element->getRect() , 283 element->getRect() ,
284 SkMatrix::I(), 284 SkMatrix::I(),
285 element->getRect() ,
286 false); 285 false);
287 } else { 286 } else {
288 fGpu->drawSimpleRect(element->getRect(), NULL); 287 fGpu->drawSimpleRect(element->getRect(), NULL);
289 } 288 }
290 return true; 289 return true;
291 case Element::kPath_Type: { 290 case Element::kPath_Type: {
292 SkTCopyOnFirstWrite<SkPath> path(element->getPath()); 291 SkTCopyOnFirstWrite<SkPath> path(element->getPath());
293 if (path->isInverseFillType()) { 292 if (path->isInverseFillType()) {
294 path.writable()->toggleInverseFillType(); 293 path.writable()->toggleInverseFillType();
295 } 294 }
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 1000
1002 //////////////////////////////////////////////////////////////////////////////// 1001 ////////////////////////////////////////////////////////////////////////////////
1003 void GrClipMaskManager::releaseResources() { 1002 void GrClipMaskManager::releaseResources() {
1004 fAACache.releaseResources(); 1003 fAACache.releaseResources();
1005 } 1004 }
1006 1005
1007 void GrClipMaskManager::setGpu(GrGpu* gpu) { 1006 void GrClipMaskManager::setGpu(GrGpu* gpu) {
1008 fGpu = gpu; 1007 fGpu = gpu;
1009 fAACache.setContext(gpu->getContext()); 1008 fAACache.setContext(gpu->getContext());
1010 } 1009 }
OLDNEW
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698