blob: a4c7f4f81a0927a4d05cac09decc971a80c7b31d [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();
mtkleina06a9532014-11-18 09:27:49 -080015 return SkNEW_ARGS(SkRTree, (aspectRatio));
robertphillips@google.com770963f2014-04-18 18:04:41 +000016}