Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.ui.resources.sprites; | 5 package org.chromium.ui.resources.sprites; |
| 6 | 6 |
| 7 import android.content.res.Resources; | 7 import android.content.res.Resources; |
| 8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
| 9 import android.graphics.BitmapFactory; | 9 import android.graphics.BitmapFactory; |
| 10 import android.graphics.Rect; | 10 import android.graphics.Rect; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 public Bitmap getBitmap() { | 75 public Bitmap getBitmap() { |
| 76 return mBitmap; | 76 return mBitmap; |
| 77 } | 77 } |
| 78 | 78 |
| 79 @Override | 79 @Override |
| 80 public Rect getBitmapSize() { | 80 public Rect getBitmapSize() { |
| 81 return mBitmapSize; | 81 return mBitmapSize; |
| 82 } | 82 } |
| 83 | 83 |
| 84 @Override | 84 @Override |
| 85 public Rect getPadding() { | 85 public long createNativeResource() { |
| 86 return EMPTY_RECT; | 86 return 0; |
|
David Trainor- moved to gerrit
2017/03/14 18:31:52
Add a TODO to figure this out.
Khushal
2017/03/15 01:50:06
Done.
| |
| 87 } | |
| 88 | |
| 89 @Override | |
| 90 public Rect getAperture() { | |
| 91 return EMPTY_RECT; | |
| 92 } | 87 } |
| 93 | 88 |
| 94 /** | 89 /** |
| 95 * @return The scaled width of an individual sprite in px. | 90 * @return The scaled width of an individual sprite in px. |
| 96 */ | 91 */ |
| 97 public float getScaledSpriteWidth() { | 92 public float getScaledSpriteWidth() { |
| 98 return mScaledSpriteWidth; | 93 return mScaledSpriteWidth; |
| 99 } | 94 } |
| 100 | 95 |
| 101 /** | 96 /** |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 for (int i = 0; i < frameCount; i++) { | 276 for (int i = 0; i < frameCount; i++) { |
| 282 ArrayList<Integer> frameRectangles = allFrameRectangles.get(i); | 277 ArrayList<Integer> frameRectangles = allFrameRectangles.get(i); |
| 283 int[] frameRectanglesArray = new int[frameRectangles.size()]; | 278 int[] frameRectanglesArray = new int[frameRectangles.size()]; |
| 284 for (int j = 0; j < frameRectangles.size(); j++) { | 279 for (int j = 0; j < frameRectangles.size(); j++) { |
| 285 frameRectanglesArray[j] = frameRectangles.get(j); | 280 frameRectanglesArray[j] = frameRectangles.get(j); |
| 286 } | 281 } |
| 287 mRectangles[i] = frameRectanglesArray; | 282 mRectangles[i] = frameRectanglesArray; |
| 288 } | 283 } |
| 289 } | 284 } |
| 290 } | 285 } |
| OLD | NEW |