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

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

Issue 14314004: Axis aligned shader-based rect drawing (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Addressed code review issues (renaming & API change) 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 drawState->setRenderTarget(target->asRenderTarget()); 274 drawState->setRenderTarget(target->asRenderTarget());
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(),
285 element->getRect() ,
284 false); 286 false);
285 } else { 287 } else {
286 fGpu->drawSimpleRect(element->getRect(), NULL); 288 fGpu->drawSimpleRect(element->getRect(), NULL);
287 } 289 }
288 return true; 290 return true;
289 case Element::kPath_Type: { 291 case Element::kPath_Type: {
290 SkTCopyOnFirstWrite<SkPath> path(element->getPath()); 292 SkTCopyOnFirstWrite<SkPath> path(element->getPath());
291 if (path->isInverseFillType()) { 293 if (path->isInverseFillType()) {
292 path.writable()->toggleInverseFillType(); 294 path.writable()->toggleInverseFillType();
293 } 295 }
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 1001
1000 //////////////////////////////////////////////////////////////////////////////// 1002 ////////////////////////////////////////////////////////////////////////////////
1001 void GrClipMaskManager::releaseResources() { 1003 void GrClipMaskManager::releaseResources() {
1002 fAACache.releaseResources(); 1004 fAACache.releaseResources();
1003 } 1005 }
1004 1006
1005 void GrClipMaskManager::setGpu(GrGpu* gpu) { 1007 void GrClipMaskManager::setGpu(GrGpu* gpu) {
1006 fGpu = gpu; 1008 fGpu = gpu;
1007 fAACache.setContext(gpu->getContext()); 1009 fAACache.setContext(gpu->getContext());
1008 } 1010 }
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