aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBBHFactory.cpp
blob: b10dc985f8208ccd80c9a41b89cd14311a38e3d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright 2014 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "SkBBHFactory.h"
#include "SkRect.h"
#include "SkRTree.h"
#include "SkScalar.h"

SkBBoxHierarchy* SkRTreeFactory::operator()(const SkRect& bounds) const {
    SkScalar aspectRatio = bounds.width() / bounds.height();
    return new SkRTree(aspectRatio);
}

// TODO(thakis@chromium): remove once HTTP://llvm.org/26506 is fixed
SkRTreeFactory::SkRTreeFactory() {
}