blob: 2d39a6045160aaf4e4101967a85a268a58fe8be8 [file] [log] [blame]
/*
* 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 "include/core/SkBBHFactory.h"
#include "include/core/SkRect.h"
#include "include/core/SkScalar.h"
#include "src/core/SkRTree.h"
SkBBoxHierarchy* SkRTreeFactory::operator()(const SkRect& bounds) const {
SkScalar aspectRatio = bounds.width() / bounds.height();
return new SkRTree(aspectRatio);
}