blob: 8f6eb1e77cee6110b6d5c714f7960266e8916cca [file] [log] [blame]
bsalomon@google.comaeb21602011-08-30 18:13:44 +00001
2/*
bsalomon@google.com69cc6ad2012-01-17 14:25:10 +00003 * Copyright 2012 Google Inc.
bsalomon@google.comaeb21602011-08-30 18:13:44 +00004 *
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.com69cc6ad2012-01-17 14:25:10 +00009
bsalomon@google.comaeb21602011-08-30 18:13:44 +000010#include "GrAAHairLinePathRenderer.h"
bsalomon@google.com69cc6ad2012-01-17 14:25:10 +000011#include "GrAAConvexPathRenderer.h"
bsalomon@google.comaeb21602011-08-30 18:13:44 +000012
13void GrPathRenderer::AddPathRenderers(GrContext* ctx,
14 GrPathRendererChain::UsageFlags flags,
15 GrPathRendererChain* chain) {
16 if (!(GrPathRendererChain::kNonAAOnly_UsageFlag & flags)) {
bsalomon@google.com69cc6ad2012-01-17 14:25:10 +000017
bsalomon@google.comaeb21602011-08-30 18:13:44 +000018 if (GrPathRenderer* pr = GrAAHairLinePathRenderer::Create(ctx)) {
19 chain->addPathRenderer(pr)->unref();
20 }
bsalomon@google.com3e5afe72012-01-30 20:25:23 +000021 chain->addPathRenderer(new GrAAConvexPathRenderer())->unref();
bsalomon@google.comaeb21602011-08-30 18:13:44 +000022 }
23}