OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.content.common; | 5 package org.chromium.content.common; |
6 | 6 |
7 import android.os.Parcel; | 7 import android.os.Parcel; |
8 import android.os.Parcelable; | 8 import android.os.Parcelable; |
9 import android.view.Surface; | 9 import android.view.Surface; |
10 | 10 |
| 11 import org.chromium.base.annotations.MainDex; |
| 12 |
11 /** | 13 /** |
12 * A wrapper for marshalling a Surface without self-destruction. | 14 * A wrapper for marshalling a Surface without self-destruction. |
13 */ | 15 */ |
| 16 @MainDex |
14 public class SurfaceWrapper implements Parcelable { | 17 public class SurfaceWrapper implements Parcelable { |
15 private final Surface mSurface; | 18 private final Surface mSurface; |
16 | 19 |
17 public SurfaceWrapper(Surface surface) { | 20 public SurfaceWrapper(Surface surface) { |
18 mSurface = surface; | 21 mSurface = surface; |
19 } | 22 } |
20 | 23 |
21 public Surface getSurface() { | 24 public Surface getSurface() { |
22 return mSurface; | 25 return mSurface; |
23 } | 26 } |
(...skipping 16 matching lines...) Expand all Loading... |
40 Surface surface = Surface.CREATOR.createFromParcel(in); | 43 Surface surface = Surface.CREATOR.createFromParcel(in); |
41 return new SurfaceWrapper(surface); | 44 return new SurfaceWrapper(surface); |
42 } | 45 } |
43 | 46 |
44 @Override | 47 @Override |
45 public SurfaceWrapper[] newArray(int size) { | 48 public SurfaceWrapper[] newArray(int size) { |
46 return new SurfaceWrapper[size]; | 49 return new SurfaceWrapper[size]; |
47 } | 50 } |
48 }; | 51 }; |
49 } | 52 } |
OLD | NEW |