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" |
robertphillips@google.com | 7c2578d | 2012-05-01 12:19:34 +0000 | [diff] [blame] | 12 | #include "GrSoftwarePathRenderer.h" |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 13 | |
| 14 | void GrPathRenderer::AddPathRenderers(GrContext* ctx, |
| 15 | GrPathRendererChain::UsageFlags flags, |
| 16 | GrPathRendererChain* chain) { |
| 17 | if (!(GrPathRendererChain::kNonAAOnly_UsageFlag & flags)) { |
bsalomon@google.com | 69cc6ad | 2012-01-17 14:25:10 +0000 | [diff] [blame] | 18 | |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 19 | if (GrPathRenderer* pr = GrAAHairLinePathRenderer::Create(ctx)) { |
| 20 | chain->addPathRenderer(pr)->unref(); |
| 21 | } |
bsalomon@google.com | 3e5afe7 | 2012-01-30 20:25:23 +0000 | [diff] [blame] | 22 | chain->addPathRenderer(new GrAAConvexPathRenderer())->unref(); |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 23 | } |
| 24 | } |