robertphillips@google.com | 770963f | 2014-04-18 18:04:41 +0000 | [diff] [blame] | 1 | /* |
| 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" |
bungeman | d3ebb48 | 2015-08-05 13:57:49 -0700 | [diff] [blame] | 9 | #include "SkRect.h" |
robertphillips@google.com | 770963f | 2014-04-18 18:04:41 +0000 | [diff] [blame] | 10 | #include "SkRTree.h" |
bungeman | d3ebb48 | 2015-08-05 13:57:49 -0700 | [diff] [blame] | 11 | #include "SkScalar.h" |
robertphillips@google.com | 770963f | 2014-04-18 18:04:41 +0000 | [diff] [blame] | 12 | |
reed | 78e2768 | 2014-11-19 08:04:34 -0800 | [diff] [blame] | 13 | SkBBoxHierarchy* SkRTreeFactory::operator()(const SkRect& bounds) const { |
| 14 | SkScalar aspectRatio = bounds.width() / bounds.height(); |
halcanary | 385fe4d | 2015-08-26 13:07:48 -0700 | [diff] [blame] | 15 | return new SkRTree(aspectRatio); |
robertphillips@google.com | 770963f | 2014-04-18 18:04:41 +0000 | [diff] [blame] | 16 | } |
brucedawson | 964eec6 | 2016-02-06 12:40:56 -0800 | [diff] [blame] | 17 | |
| 18 | // TODO(thakis@chromium): remove once HTTP://llvm.org/26506 is fixed |
| 19 | SkRTreeFactory::SkRTreeFactory() { |
| 20 | } |