bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
bsalomon@google.com | 69cc6ad | 2012-01-17 14:25:10 +0000 | [diff] [blame] | 3 | * Copyright 2012 Google Inc. |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
bsalomon@google.com | 69cc6ad | 2012-01-17 14:25:10 +0000 | [diff] [blame] | 9 | |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 10 | #include "GrAAHairLinePathRenderer.h" |
bsalomon@google.com | 69cc6ad | 2012-01-17 14:25:10 +0000 | [diff] [blame] | 11 | #include "GrAAConvexPathRenderer.h" |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 12 | |
| 13 | void GrPathRenderer::AddPathRenderers(GrContext* ctx, |
| 14 | GrPathRendererChain::UsageFlags flags, |
| 15 | GrPathRendererChain* chain) { |
| 16 | if (!(GrPathRendererChain::kNonAAOnly_UsageFlag & flags)) { |
bsalomon@google.com | 69cc6ad | 2012-01-17 14:25:10 +0000 | [diff] [blame] | 17 | |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 18 | if (GrPathRenderer* pr = GrAAHairLinePathRenderer::Create(ctx)) { |
| 19 | chain->addPathRenderer(pr)->unref(); |
| 20 | } |
bsalomon@google.com | 3e5afe7 | 2012-01-30 20:25:23 +0000 | [diff] [blame] | 21 | chain->addPathRenderer(new GrAAConvexPathRenderer())->unref(); |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 22 | } |
| 23 | } |