2014-04-18 18:04:41 +00:00
|
|
|
/*
|
|
|
|
* 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"
|
2015-08-05 20:57:49 +00:00
|
|
|
#include "SkRect.h"
|
2014-04-18 18:04:41 +00:00
|
|
|
#include "SkRTree.h"
|
2015-08-05 20:57:49 +00:00
|
|
|
#include "SkScalar.h"
|
2014-04-18 18:04:41 +00:00
|
|
|
|
2014-11-19 16:04:34 +00:00
|
|
|
SkBBoxHierarchy* SkRTreeFactory::operator()(const SkRect& bounds) const {
|
|
|
|
SkScalar aspectRatio = bounds.width() / bounds.height();
|
2015-08-26 20:07:48 +00:00
|
|
|
return new SkRTree(aspectRatio);
|
2014-04-18 18:04:41 +00:00
|
|
|
}
|