blob: 0a8674fad7eb9f82b468968a7460eba319f2e131 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/vr/vr_base_export.h"
#include "ui/gfx/geometry/rect.h"
namespace gfx {
class RectF;
class Size;
class SizeF;
class Transform;
} // namespace gfx
namespace vr {
VR_BASE_EXPORT gfx::Rect CalculatePixelSpaceRect(
const gfx::Size& texture_size,
const gfx::RectF& texture_rect);
// Returns the normalized size of the element projected into screen space.
// If (1, 1) the element fills the entire buffer.
VR_BASE_EXPORT gfx::SizeF CalculateScreenSize(const gfx::Transform& proj_matrix,
float distance,
const gfx::SizeF& size);
} // namespace vr