blob: 2c175e204295a1c9852cefa866ee21afddfcb495 [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"
robertphillips@google.com7c2578d2012-05-01 12:19:34 +000012#include "GrSoftwarePathRenderer.h"
bsalomon@google.comaeb21602011-08-30 18:13:44 +000013
14void GrPathRenderer::AddPathRenderers(GrContext* ctx,
15 GrPathRendererChain::UsageFlags flags,
16 GrPathRendererChain* chain) {
17 if (!(GrPathRendererChain::kNonAAOnly_UsageFlag & flags)) {
bsalomon@google.com69cc6ad2012-01-17 14:25:10 +000018
bsalomon@google.comaeb21602011-08-30 18:13:44 +000019 if (GrPathRenderer* pr = GrAAHairLinePathRenderer::Create(ctx)) {
20 chain->addPathRenderer(pr)->unref();
21 }
bsalomon@google.com3e5afe72012-01-30 20:25:23 +000022 chain->addPathRenderer(new GrAAConvexPathRenderer())->unref();
bsalomon@google.comaeb21602011-08-30 18:13:44 +000023 }
24}