| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |