mobile/android/base/gfx/ProgressiveUpdateData.java

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial