1b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy/*
2b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy * Copyright (C) 2010 The Android Open Source Project
3b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy *
4b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy * Licensed under the Apache License, Version 2.0 (the "License");
5b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy * you may not use this file except in compliance with the License.
6b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy * You may obtain a copy of the License at
7b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy *
8b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy *      http://www.apache.org/licenses/LICENSE-2.0
9b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy *
10b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy * Unless required by applicable law or agreed to in writing, software
11b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy * distributed under the License is distributed on an "AS IS" BASIS,
12b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy * See the License for the specific language governing permissions and
14b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy * limitations under the License.
15b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy */
16b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy
17b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guypackage android.view;
18b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy
199420abd56a2af7ddbeb70562b79d61b2dca8c5a1Chet Haaseimport android.graphics.Matrix;
209420abd56a2af7ddbeb70562b79d61b2dca8c5a1Chet Haase
21b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy/**
2252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <p>A display list records a series of graphics related operations and can replay
23b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy * them later. Display lists are usually built by recording operations on a
2452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * {@link HardwareCanvas}. Replaying the operations from a display list avoids
2552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * executing application code on every frame, and is thus much more efficient.</p>
26daf98e941e140e8739458126640183b9f296a2abChet Haase *
2752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <p>Display lists are used internally for all views by default, and are not
2852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * typically used directly. One reason to consider using a display is a custom
2952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * {@link View} implementation that needs to issue a large number of drawing commands.
3052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * When the view invalidates, all the drawing commands must be reissued, even if
3152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * large portions of the drawing command stream stay the same frame to frame, which
3252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * can become a performance bottleneck. To solve this issue, a custom View might split
3352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * its content into several display lists. A display list is updated only when its
3452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * content, and only its content, needs to be updated.</p>
3552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *
3652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <p>A text editor might for instance store each paragraph into its own display list.
3752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * Thus when the user inserts or removes characters, only the display list of the
3852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * affected paragraph needs to be recorded again.</p>
3952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *
4052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <h3>Hardware acceleration</h3>
4152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <p>Display lists can only be replayed using a {@link HardwareCanvas}. They are not
4252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * supported in software. Always make sure that the {@link android.graphics.Canvas}
4352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * you are using to render a display list is hardware accelerated using
4452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * {@link android.graphics.Canvas#isHardwareAccelerated()}.</p>
4552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *
4652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <h3>Creating a display list</h3>
4752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <pre class="prettyprint">
4852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     HardwareRenderer renderer = myView.getHardwareRenderer();
4952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     if (renderer != null) {
5052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         DisplayList displayList = renderer.createDisplayList();
5152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         HardwareCanvas canvas = displayList.start(width, height);
5252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         try {
5352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             // Draw onto the canvas
5452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             // For instance: canvas.drawBitmap(...);
5552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         } finally {
5652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             displayList.end();
5752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         }
5852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     }
5952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * </pre>
6052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *
6152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <h3>Rendering a display list on a View</h3>
6252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <pre class="prettyprint">
6352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     protected void onDraw(Canvas canvas) {
6452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         if (canvas.isHardwareAccelerated()) {
6552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             HardwareCanvas hardwareCanvas = (HardwareCanvas) canvas;
6652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             hardwareCanvas.drawDisplayList(mDisplayList);
6752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         }
6852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     }
6952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * </pre>
7052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *
7152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <h3>Releasing resources</h3>
7252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <p>This step is not mandatory but recommended if you want to release resources
7352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * held by a display list as soon as possible.</p>
7452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <pre class="prettyprint">
7552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     // Mark this display list invalid, it cannot be used for drawing anymore,
7652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     // and release resources held by this display list
7752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     displayList.clear();
7852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * </pre>
7952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *
8052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <h3>Properties</h3>
8152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <p>In addition, a display list offers several properties, such as
8252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * {@link #setScaleX(float)} or {@link #setLeft(int)}, that can be used to affect all
8352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * the drawing commands recorded within. For instance, these properties can be used
8452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * to move around a large number of images without re-issuing all the individual
8552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <code>drawBitmap()</code> calls.</p>
8652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *
8752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <pre class="prettyprint">
8852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     private void createDisplayList() {
8952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         HardwareRenderer renderer = getHardwareRenderer();
9052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         if (renderer != null) {
9152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             mDisplayList = renderer.createDisplayList();
9252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             HardwareCanvas canvas = mDisplayList.start(width, height);
9352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             try {
9452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *                 for (Bitmap b : mBitmaps) {
9552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *                     canvas.drawBitmap(b, 0.0f, 0.0f, null);
9652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *                     canvas.translate(0.0f, b.getHeight());
9752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *                 }
9852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             } finally {
9952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *                 displayList.end();
10052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             }
10152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         }
10252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     }
10352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *
10452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     protected void onDraw(Canvas canvas) {
10552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         if (canvas.isHardwareAccelerated()) {
10652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             HardwareCanvas hardwareCanvas = (HardwareCanvas) canvas;
10752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *             hardwareCanvas.drawDisplayList(mDisplayList);
10852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *         }
10952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     }
11052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *
11152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     private void moveContentBy(int x) {
11252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *          // This will move all the bitmaps recorded inside the display list
11352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *          // by x pixels to the right and redraw this view. All the commands
11452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *          // recorded in createDisplayList() won't be re-issued, only onDraw()
11552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *          // will be invoked and will execute very quickly
11652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *          mDisplayList.offsetLeftAndRight(x);
11752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *          invalidate();
11852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *     }
11952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * </pre>
12052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *
12152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <h3>Threading</h3>
12252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * <p>Display lists must be created on and manipulated from the UI thread only.</p>
12352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy *
12452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy * @hide
125b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy */
126daf98e941e140e8739458126640183b9f296a2abChet Haasepublic abstract class DisplayList {
127fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy    private boolean mDirty;
128fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy
129b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy    /**
13033f6beb10f98e8ba96250e284876d607055d278dRomain Guy     * Flag used when calling
1313dd4b51fc37c1f05b1b583f5706e3a12216b9822Romain Guy     * {@link HardwareCanvas#drawDisplayList(DisplayList, android.graphics.Rect, int)}
13233f6beb10f98e8ba96250e284876d607055d278dRomain Guy     * When this flag is set, draw operations lying outside of the bounds of the
13333f6beb10f98e8ba96250e284876d607055d278dRomain Guy     * display list will be culled early. It is recommeneded to always set this
13433f6beb10f98e8ba96250e284876d607055d278dRomain Guy     * flag.
13552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
13652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
13733f6beb10f98e8ba96250e284876d607055d278dRomain Guy     */
13833f6beb10f98e8ba96250e284876d607055d278dRomain Guy    public static final int FLAG_CLIP_CHILDREN = 0x1;
13933f6beb10f98e8ba96250e284876d607055d278dRomain Guy
1406554943a1dd6854c0f4976900956e556767b49e1Romain Guy    // NOTE: The STATUS_* values *must* match the enum in DrawGlInfo.h
1416554943a1dd6854c0f4976900956e556767b49e1Romain Guy
1426554943a1dd6854c0f4976900956e556767b49e1Romain Guy    /**
1436554943a1dd6854c0f4976900956e556767b49e1Romain Guy     * Indicates that the display list is done drawing.
1446554943a1dd6854c0f4976900956e556767b49e1Romain Guy     *
14552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see HardwareCanvas#drawDisplayList(DisplayList, android.graphics.Rect, int)
14652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
14752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
1486554943a1dd6854c0f4976900956e556767b49e1Romain Guy     */
1496554943a1dd6854c0f4976900956e556767b49e1Romain Guy    public static final int STATUS_DONE = 0x0;
1506554943a1dd6854c0f4976900956e556767b49e1Romain Guy
1516554943a1dd6854c0f4976900956e556767b49e1Romain Guy    /**
1526554943a1dd6854c0f4976900956e556767b49e1Romain Guy     * Indicates that the display list needs another drawing pass.
1536554943a1dd6854c0f4976900956e556767b49e1Romain Guy     *
15452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see HardwareCanvas#drawDisplayList(DisplayList, android.graphics.Rect, int)
15552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
15652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
1576554943a1dd6854c0f4976900956e556767b49e1Romain Guy     */
158c553fea6b0b8d371c22bb4011cc9555d441aab39Romain Guy    public static final int STATUS_DRAW = 0x1;
1596554943a1dd6854c0f4976900956e556767b49e1Romain Guy
1606554943a1dd6854c0f4976900956e556767b49e1Romain Guy    /**
1616554943a1dd6854c0f4976900956e556767b49e1Romain Guy     * Indicates that the display list needs to re-execute its GL functors.
1626554943a1dd6854c0f4976900956e556767b49e1Romain Guy     *
1633dd4b51fc37c1f05b1b583f5706e3a12216b9822Romain Guy     * @see HardwareCanvas#drawDisplayList(DisplayList, android.graphics.Rect, int)
16452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see HardwareCanvas#callDrawGLFunction(int)
16552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
16652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
1676554943a1dd6854c0f4976900956e556767b49e1Romain Guy     */
1686554943a1dd6854c0f4976900956e556767b49e1Romain Guy    public static final int STATUS_INVOKE = 0x2;
1696554943a1dd6854c0f4976900956e556767b49e1Romain Guy
17033f6beb10f98e8ba96250e284876d607055d278dRomain Guy    /**
171486590963e2207d68eebd6944fec70d50d41116aChet Haase     * Indicates that the display list performed GL drawing operations.
172486590963e2207d68eebd6944fec70d50d41116aChet Haase     *
173486590963e2207d68eebd6944fec70d50d41116aChet Haase     * @see HardwareCanvas#drawDisplayList(DisplayList, android.graphics.Rect, int)
17452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
17552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
176486590963e2207d68eebd6944fec70d50d41116aChet Haase     */
177486590963e2207d68eebd6944fec70d50d41116aChet Haase    public static final int STATUS_DREW = 0x4;
178486590963e2207d68eebd6944fec70d50d41116aChet Haase
179486590963e2207d68eebd6944fec70d50d41116aChet Haase    /**
180b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy     * Starts recording the display list. All operations performed on the
181b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy     * returned canvas are recorded and stored in this display list.
18252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
18352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Calling this method will mark the display list invalid until
18452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * {@link #end()} is called. Only valid display lists can be replayed.
18552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
18652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param width The width of the display list's viewport
18752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param height The height of the display list's viewport
18852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
189b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy     * @return A canvas to record drawing operations.
19052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
19152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #end()
19252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #isValid()
193b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy     */
19452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract HardwareCanvas start(int width, int height);
195b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy
196b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy    /**
197b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy     * Ends the recording for this display list. A display list cannot be
19852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * replayed if recording is not finished. Calling this method marks
19952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * the display list valid and {@link #isValid()} will return true.
20052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
20152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #start(int, int)
20252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #isValid()
203b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy     */
204b35ab7b72967adcfd01cec483a705dafe8b951d1Gilles Debunne    public abstract void end();
205b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy
206b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy    /**
20752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Clears resources held onto by this display list. After calling this method
20852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * {@link #isValid()} will return false.
20952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
21052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #isValid()
2119e90a9953b65ae575ec8db3989857e0c145724b1Chet Haase     */
21252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract void clear();
2139e90a9953b65ae575ec8db3989857e0c145724b1Chet Haase
2149e90a9953b65ae575ec8db3989857e0c145724b1Chet Haase    /**
21552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the dirty flag. When a display list is dirty, {@link #clear()} should
21652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * be invoked whenever possible.
21752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
21852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #isDirty()
21952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #clear()
22052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
22152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
22238c2ece5ce4c59f30e5832779bf1d86d68b1c442Romain Guy     */
22352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public void markDirty() {
22452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy        mDirty = true;
22552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    }
22638c2ece5ce4c59f30e5832779bf1d86d68b1c442Romain Guy
22738c2ece5ce4c59f30e5832779bf1d86d68b1c442Romain Guy    /**
22852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Removes the dirty flag. This method can be used to cancel a cleanup
22952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * previously scheduled by setting the dirty flag.
230fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy     *
231fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy     * @see #isDirty()
23252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #clear()
23352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
23452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
235fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy     */
23652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    protected void clearDirty() {
23752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy        mDirty = false;
238fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy    }
239fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy
240fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy    /**
241fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy     * Indicates whether the display list is dirty.
242fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy     *
24352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #markDirty()
24452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #clear()
24552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
24652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
247fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy     */
248fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy    public boolean isDirty() {
249fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy        return mDirty;
250fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy    }
251fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy
252fbb93fa2f3abf8b50ea945a319c0a190f2aae213Romain Guy    /**
2539e90a9953b65ae575ec8db3989857e0c145724b1Chet Haase     * Returns whether the display list is currently usable. If this returns false,
2549e90a9953b65ae575ec8db3989857e0c145724b1Chet Haase     * the display list should be re-recorded prior to replaying it.
2559e90a9953b65ae575ec8db3989857e0c145724b1Chet Haase     *
2569e90a9953b65ae575ec8db3989857e0c145724b1Chet Haase     * @return boolean true if the display list is able to be replayed, false otherwise.
2579e90a9953b65ae575ec8db3989857e0c145724b1Chet Haase     */
258b35ab7b72967adcfd01cec483a705dafe8b951d1Gilles Debunne    public abstract boolean isValid();
25965b345fa22b878e141b8fd8ece9c208df00fa40fRomain Guy
26065b345fa22b878e141b8fd8ece9c208df00fa40fRomain Guy    /**
26165b345fa22b878e141b8fd8ece9c208df00fa40fRomain Guy     * Return the amount of memory used by this display list.
26265b345fa22b878e141b8fd8ece9c208df00fa40fRomain Guy     *
26365b345fa22b878e141b8fd8ece9c208df00fa40fRomain Guy     * @return The size of this display list in bytes
26452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
26552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
26665b345fa22b878e141b8fd8ece9c208df00fa40fRomain Guy     */
267b35ab7b72967adcfd01cec483a705dafe8b951d1Gilles Debunne    public abstract int getSize();
268a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
269a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    ///////////////////////////////////////////////////////////////////////////
270a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    // DisplayList Property Setters
271a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    ///////////////////////////////////////////////////////////////////////////
272a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
273a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
27452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Set the caching property on the display list, which indicates whether the display list
27552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * holds a layer. Layer display lists should avoid creating an alpha layer, since alpha is
276a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * handled in the drawLayer operation directly (and more efficiently).
277a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
27852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param caching true if the display list represents a hardware layer, false otherwise.
27952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
28052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
281a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
282a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setCaching(boolean caching);
283a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
284a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
28552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Set whether the display list should clip itself to its bounds. This property is controlled by
286a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * the view's parent.
287a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
288dd671599bed9d3ca28e2c744e8c224e1e15bc914Chet Haase     * @param clipToBounds true if the display list should clip to its bounds
289a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
290dd671599bed9d3ca28e2c744e8c224e1e15bc914Chet Haase    public abstract void setClipToBounds(boolean clipToBounds);
291a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
292a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
29352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Set the static matrix on the display list. The specified matrix is combined with other
29452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * transforms (such as {@link #setScaleX(float)}, {@link #setRotation(float)}, etc.)
29552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
29652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param matrix A transform matrix to apply to this display list
2979420abd56a2af7ddbeb70562b79d61b2dca8c5a1Chet Haase     *
29852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getMatrix(android.graphics.Matrix)
29952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getMatrix()
3009420abd56a2af7ddbeb70562b79d61b2dca8c5a1Chet Haase     */
30152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract void setMatrix(Matrix matrix);
30252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
30352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
30452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the static matrix set on this display list.
30552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
30652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @return A new {@link Matrix} instance populated with this display list's static
30752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *         matrix
30852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
30952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getMatrix(android.graphics.Matrix)
31052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setMatrix(android.graphics.Matrix)
31152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
31252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public Matrix getMatrix() {
31352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy        return getMatrix(new Matrix());
31452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    }
3159420abd56a2af7ddbeb70562b79d61b2dca8c5a1Chet Haase
3169420abd56a2af7ddbeb70562b79d61b2dca8c5a1Chet Haase    /**
31752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Copies this display list's static matrix into the specified matrix.
31852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
31952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param matrix The {@link Matrix} instance in which to copy this display
32052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *               list's static matrix. Cannot be null
32152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
32252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @return The <code>matrix</code> parameter, for convenience
32352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
32452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getMatrix()
32552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setMatrix(android.graphics.Matrix)
32652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
32752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract Matrix getMatrix(Matrix matrix);
32852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
32952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
33052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Set the Animation matrix on the display list. This matrix exists if an Animation is
33152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * currently playing on a View, and is set on the display list during at draw() time. When
3329420abd56a2af7ddbeb70562b79d61b2dca8c5a1Chet Haase     * the Animation finishes, the matrix should be cleared by sending <code>null</code>
3339420abd56a2af7ddbeb70562b79d61b2dca8c5a1Chet Haase     * for the matrix parameter.
334a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
3359420abd56a2af7ddbeb70562b79d61b2dca8c5a1Chet Haase     * @param matrix The matrix, null indicates that the matrix should be cleared.
33652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
33752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
338a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
3399420abd56a2af7ddbeb70562b79d61b2dca8c5a1Chet Haase    public abstract void setAnimationMatrix(Matrix matrix);
340a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
341a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
34252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the translucency level for the display list.
34352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
34452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param alpha The translucency of the display list, must be a value between 0.0f and 1.0f
345a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
346a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setAlpha(float)
34752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getAlpha()
348a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
349a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setAlpha(float alpha);
350a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
351a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
35252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the translucency level of this display list.
35352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
35452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @return A value between 0.0f and 1.0f
35552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
35652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setAlpha(float)
35752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
35852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getAlpha();
35952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
36052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
36152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets whether the display list renders content which overlaps. Non-overlapping rendering
36252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * can use a fast path for alpha that avoids rendering to an offscreen buffer. By default
36352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * display lists consider they do not have overlapping content.
36452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
36552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param hasOverlappingRendering False if the content is guaranteed to be non-overlapping,
36652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *                                true otherwise.
367db8c9a6a4d9bf8c39f834b25611926caf21380f6Chet Haase     *
368db8c9a6a4d9bf8c39f834b25611926caf21380f6Chet Haase     * @see android.view.View#hasOverlappingRendering()
36952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #hasOverlappingRendering()
370db8c9a6a4d9bf8c39f834b25611926caf21380f6Chet Haase     */
371db8c9a6a4d9bf8c39f834b25611926caf21380f6Chet Haase    public abstract void setHasOverlappingRendering(boolean hasOverlappingRendering);
372db8c9a6a4d9bf8c39f834b25611926caf21380f6Chet Haase
373db8c9a6a4d9bf8c39f834b25611926caf21380f6Chet Haase    /**
37452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Indicates whether the content of this display list overlaps.
37552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
37652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @return True if this display list renders content which overlaps, false otherwise.
37752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
37852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setHasOverlappingRendering(boolean)
37952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
38052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract boolean hasOverlappingRendering();
38152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
38252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
38352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the translation value for the display list on the X axis
38452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
38552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param translationX The X axis translation value of the display list, in pixels
386a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
387a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setTranslationX(float)
38852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getTranslationX()
389a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
390a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setTranslationX(float translationX);
391a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
392a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
39352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the translation value for this display list on the X axis, in pixels.
39452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
39552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setTranslationX(float)
39652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
39752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getTranslationX();
39852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
39952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
40052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the translation value for the display list on the Y axis
40152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
40252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param translationY The Y axis translation value of the display list, in pixels
403a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
404a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setTranslationY(float)
40552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getTranslationY()
406a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
407a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setTranslationY(float translationY);
408a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
409a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
41052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the translation value for this display list on the Y axis, in pixels.
41152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
41252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setTranslationY(float)
41352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
41452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getTranslationY();
41552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
41652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
41752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the rotation value for the display list around the Z axis
41852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
41952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param rotation The rotation value of the display list, in degrees
420a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
421a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setRotation(float)
42252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getRotation()
423a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
424a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setRotation(float rotation);
425a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
426a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
42752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the rotation value for this display list around the Z axis, in degrees.
42852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
42952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setRotation(float)
43052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
43152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getRotation();
43252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
43352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
43452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the rotation value for the display list around the X axis
43552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
43652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param rotationX The rotation value of the display list, in degrees
437a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
438a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setRotationX(float)
43952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getRotationX()
440a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
441a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setRotationX(float rotationX);
442a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
443a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
44452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the rotation value for this display list around the X axis, in degrees.
44552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
44652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setRotationX(float)
44752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
44852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getRotationX();
44952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
45052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
45152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the rotation value for the display list around the Y axis
45252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
45352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param rotationY The rotation value of the display list, in degrees
454a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
455a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setRotationY(float)
45652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getRotationY()
457a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
458a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setRotationY(float rotationY);
459a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
460a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
46152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the rotation value for this display list around the Y axis, in degrees.
46252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
46352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setRotationY(float)
46452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
46552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getRotationY();
46652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
46752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
46852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the scale value for the display list on the X axis
46952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
47052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param scaleX The scale value of the display list
471a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
472a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setScaleX(float)
47352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getScaleX()
474a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
475a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setScaleX(float scaleX);
476a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
477a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
47852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the scale value for this display list on the X axis.
47952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
48052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setScaleX(float)
48152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
48252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getScaleX();
48352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
48452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
48552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the scale value for the display list on the Y axis
48652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
48752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param scaleY The scale value of the display list
488a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
489a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setScaleY(float)
49052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getScaleY()
491a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
492a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setScaleY(float scaleY);
493a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
494a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
49552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the scale value for this display list on the Y axis.
496a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
49752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setScaleY(float)
49852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
49952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getScaleY();
50052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
50152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
50252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets all of the transform-related values of the display list
50352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
50452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param alpha The alpha value of the display list
50552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param translationX The translationX value of the display list
50652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param translationY The translationY value of the display list
50752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param rotation The rotation value of the display list
50852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param rotationX The rotationX value of the display list
50952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param rotationY The rotationY value of the display list
51052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param scaleX The scaleX value of the display list
51152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param scaleY The scaleY value of the display list
51252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
51352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
514a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
515a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setTransformationInfo(float alpha, float translationX, float translationY,
516a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase            float rotation, float rotationX, float rotationY, float scaleX, float scaleY);
517a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
518a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
51952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the pivot value for the display list on the X axis
52052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
52152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param pivotX The pivot value of the display list on the X axis, in pixels
522a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
523a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setPivotX(float)
52452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getPivotX()
525a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
526a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setPivotX(float pivotX);
527a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
528a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
52952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the pivot value for this display list on the X axis, in pixels.
53052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
53152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setPivotX(float)
53252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
53352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getPivotX();
53452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
53552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
53652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the pivot value for the display list on the Y axis
53752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
53852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param pivotY The pivot value of the display list on the Y axis, in pixels
539a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
540a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setPivotY(float)
54152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getPivotY()
542a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
543a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setPivotY(float pivotY);
544a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
545a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
54652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the pivot value for this display list on the Y axis, in pixels.
54752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
54852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setPivotY(float)
54952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
55052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getPivotY();
55152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
55252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
55352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the camera distance for the display list. Refer to
55452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * {@link View#setCameraDistance(float)} for more information on how to
55552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * use this property.
55652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
55752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param distance The distance in Z of the camera of the display list
558a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
559a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setCameraDistance(float)
56052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getCameraDistance()
561a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
562a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setCameraDistance(float distance);
563a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
564a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
56552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the distance in Z of the camera of the display list.
56652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
56752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setCameraDistance(float)
56852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
56952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getCameraDistance();
57052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
57152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
57252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the left position for the display list.
57352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
57452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param left The left position, in pixels, of the display list
575a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
576a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setLeft(int)
57752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getLeft()
578a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
579a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setLeft(int left);
580a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
581a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
58252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the left position for the display list in pixels.
58352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
58452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setLeft(int)
58552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
58652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getLeft();
58752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
58852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
58952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the top position for the display list.
59052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
59152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param top The top position, in pixels, of the display list
592a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
593a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setTop(int)
59452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getTop()
595a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
596a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setTop(int top);
597a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
598a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
59952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the top position for the display list in pixels.
60052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
60152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setTop(int)
60252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
60352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getTop();
60452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
60552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
60652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the right position for the display list.
60752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
60852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param right The right position, in pixels, of the display list
609a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
610a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setRight(int)
61152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getRight()
612a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
613a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setRight(int right);
614a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
615a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
61652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the right position for the display list in pixels.
61752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
61852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setRight(int)
61952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     */
62052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getRight();
62152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy
62252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    /**
62352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the bottom position for the display list.
62452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
62552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param bottom The bottom position, in pixels, of the display list
626a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
627a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setBottom(int)
62852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #getBottom()
629a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
630a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setBottom(int bottom);
631a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
632a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
63352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Returns the bottom position for the display list in pixels.
634a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
63552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see #setBottom(int)
636a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
63752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract float getBottom();
638a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
639a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
64052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Sets the left and top positions for the display list
64152036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
64252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param left The left position of the display list, in pixels
64352036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param top The top position of the display list, in pixels
64452036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param right The right position of the display list, in pixels
64552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param bottom The bottom position of the display list, in pixels
646a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
647a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setLeft(int)
648a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#setTop(int)
64952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see View#setRight(int)
65052036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @see View#setBottom(int)
651a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
652a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    public abstract void setLeftTopRightBottom(int left, int top, int right, int bottom);
653a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
654a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
65552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Offsets the left and right positions for the display list
65652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
65752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param offset The amount that the left and right positions of the display
65852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *               list are offset, in pixels
659a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
660a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#offsetLeftAndRight(int)
661a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
66252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract void offsetLeftAndRight(float offset);
663a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase
664a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase    /**
66552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Offsets the top and bottom values for the display list
66652036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
66752036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @param offset The amount that the top and bottom positions of the display
66852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *               list are offset, in pixels
669a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     *
670a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     * @see View#offsetTopAndBottom(int)
671a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3Chet Haase     */
67252036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy    public abstract void offsetTopAndBottom(float offset);
6736a2d17f71342f981c9df1dc5beff33e30eb3ae2bChet Haase
6746a2d17f71342f981c9df1dc5beff33e30eb3ae2bChet Haase    /**
67552036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * Reset native resources. This is called when cleaning up the state of display lists
6766a2d17f71342f981c9df1dc5beff33e30eb3ae2bChet Haase     * during destruction of hardware resources, to ensure that we do not hold onto
6776a2d17f71342f981c9df1dc5beff33e30eb3ae2bChet Haase     * obsolete resources after related resources are gone.
67852036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     *
67952036b19a5f82bc4d75cfcbff99c65df8d25a99bRomain Guy     * @hide
6806a2d17f71342f981c9df1dc5beff33e30eb3ae2bChet Haase     */
6816a2d17f71342f981c9df1dc5beff33e30eb3ae2bChet Haase    public abstract void reset();
682b051e895ccb696604349c6c5efe7c4747e1d1ab6Romain Guy}
683