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

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

Issue 14820035: Re-add isIRect test for AA rect drawing (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
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() ,
285 false); 286 false);
286 } else { 287 } else {
287 fGpu->drawSimpleRect(element->getRect(), NULL); 288 fGpu->drawSimpleRect(element->getRect(), NULL);
288 } 289 }
289 return true; 290 return true;
290 case Element::kPath_Type: { 291 case Element::kPath_Type: {
291 SkTCopyOnFirstWrite<SkPath> path(element->getPath()); 292 SkTCopyOnFirstWrite<SkPath> path(element->getPath());
292 if (path->isInverseFillType()) { 293 if (path->isInverseFillType()) {
293 path.writable()->toggleInverseFillType(); 294 path.writable()->toggleInverseFillType();
294 } 295 }
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 1001
1001 //////////////////////////////////////////////////////////////////////////////// 1002 ////////////////////////////////////////////////////////////////////////////////
1002 void GrClipMaskManager::releaseResources() { 1003 void GrClipMaskManager::releaseResources() {
1003 fAACache.releaseResources(); 1004 fAACache.releaseResources();
1004 } 1005 }
1005 1006
1006 void GrClipMaskManager::setGpu(GrGpu* gpu) { 1007 void GrClipMaskManager::setGpu(GrGpu* gpu) {
1007 fGpu = gpu; 1008 fGpu = gpu;
1008 fAACache.setContext(gpu->getContext()); 1009 fAACache.setContext(gpu->getContext());
1009 } 1010 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698