blob: b10dc985f8208ccd80c9a41b89cd14311a38e3d8 [file] [log] [blame]
robertphillips@google.com770963f2014-04-18 18:04:41 +00001/*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "SkBBHFactory.h"
bungemand3ebb482015-08-05 13:57:49 -07009#include "SkRect.h"
robertphillips@google.com770963f2014-04-18 18:04:41 +000010#include "SkRTree.h"
bungemand3ebb482015-08-05 13:57:49 -070011#include "SkScalar.h"
robertphillips@google.com770963f2014-04-18 18:04:41 +000012
reed78e27682014-11-19 08:04:34 -080013SkBBoxHierarchy* SkRTreeFactory::operator()(const SkRect& bounds) const {
14 SkScalar aspectRatio = bounds.width() / bounds.height();
halcanary385fe4d2015-08-26 13:07:48 -070015 return new SkRTree(aspectRatio);
robertphillips@google.com770963f2014-04-18 18:04:41 +000016}
brucedawson964eec62016-02-06 12:40:56 -080017
18// TODO(thakis@chromium): remove once HTTP://llvm.org/26506 is fixed
19SkRTreeFactory::SkRTreeFactory() {
20}