Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- |
michael@0 | 2 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | package org.mozilla.gecko.gfx; |
michael@0 | 7 | |
michael@0 | 8 | import org.mozilla.gecko.mozglue.generatorannotations.WrapEntireClassForJNI; |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * This is the data structure that's returned by the progressive tile update |
michael@0 | 12 | * callback function. It encompasses the current viewport and a boolean value |
michael@0 | 13 | * representing whether the front-end is interested in the current progressive |
michael@0 | 14 | * update continuing. |
michael@0 | 15 | */ |
michael@0 | 16 | @WrapEntireClassForJNI |
michael@0 | 17 | public class ProgressiveUpdateData { |
michael@0 | 18 | public float x; |
michael@0 | 19 | public float y; |
michael@0 | 20 | public float width; |
michael@0 | 21 | public float height; |
michael@0 | 22 | public float scale; |
michael@0 | 23 | public boolean abort; |
michael@0 | 24 | |
michael@0 | 25 | public void setViewport(ImmutableViewportMetrics viewport) { |
michael@0 | 26 | this.x = viewport.viewportRectLeft; |
michael@0 | 27 | this.y = viewport.viewportRectTop; |
michael@0 | 28 | this.width = viewport.viewportRectRight - this.x; |
michael@0 | 29 | this.height = viewport.viewportRectBottom - this.y; |
michael@0 | 30 | this.scale = viewport.zoomFactor; |
michael@0 | 31 | } |
michael@0 | 32 | } |
michael@0 | 33 |