blob: acb2fe48f9f1a923d566cdeca608361bdb07cbd3 [file] [log] [blame]
John Reckcec24ae2013-11-05 13:27:50 -08001/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.view;
18
John Reckb8802b12014-06-16 15:28:50 -070019import android.content.Context;
20import android.content.res.Resources;
John Reck04fc5832014-02-05 16:38:25 -080021import android.graphics.Bitmap;
Alan Viveretteccb11e12014-07-08 16:04:02 -070022import android.graphics.Rect;
John Reckb8802b12014-06-16 15:28:50 -070023import android.graphics.drawable.Drawable;
John Reck66f0be62014-05-13 13:39:31 -070024import android.os.IBinder;
25import android.os.RemoteException;
26import android.os.ServiceManager;
John Reckfe5e7b72014-05-23 17:42:28 -070027import android.os.SystemProperties;
John Reckcec24ae2013-11-05 13:27:50 -080028import android.os.Trace;
John Reck66f0be62014-05-13 13:39:31 -070029import android.util.Log;
John Reckb8802b12014-06-16 15:28:50 -070030import android.util.LongSparseArray;
John Reck315c3292014-05-09 19:21:04 -070031import android.util.TimeUtils;
John Reckcec24ae2013-11-05 13:27:50 -080032import android.view.Surface.OutOfResourcesException;
33import android.view.View.AttachInfo;
34
John Reckfe5e7b72014-05-23 17:42:28 -070035import java.io.FileDescriptor;
John Reckcec24ae2013-11-05 13:27:50 -080036import java.io.PrintWriter;
John Reckb8802b12014-06-16 15:28:50 -070037import java.util.HashSet;
John Reckcec24ae2013-11-05 13:27:50 -080038
39/**
40 * Hardware renderer that proxies the rendering to a render thread. Most calls
John Reck4f02bf42014-01-03 18:09:17 -080041 * are currently synchronous.
John Reckcec24ae2013-11-05 13:27:50 -080042 *
43 * The UI thread can block on the RenderThread, but RenderThread must never
44 * block on the UI thread.
45 *
John Reck4f02bf42014-01-03 18:09:17 -080046 * ThreadedRenderer creates an instance of RenderProxy. RenderProxy in turn creates
47 * and manages a CanvasContext on the RenderThread. The CanvasContext is fully managed
48 * by the lifecycle of the RenderProxy.
49 *
John Reckcec24ae2013-11-05 13:27:50 -080050 * Note that although currently the EGL context & surfaces are created & managed
51 * by the render thread, the goal is to move that into a shared structure that can
52 * be managed by both threads. EGLSurface creation & deletion should ideally be
53 * done on the UI thread and not the RenderThread to avoid stalling the
54 * RenderThread with surface buffer allocation.
55 *
56 * @hide
57 */
58public class ThreadedRenderer extends HardwareRenderer {
59 private static final String LOGTAG = "ThreadedRenderer";
60
John Reckf9be7792014-05-02 18:21:16 -070061 // Keep in sync with DrawFrameTask.h SYNC_* flags
62 // Nothing interesting to report
John Reckcd028f32014-06-24 08:44:29 -070063 private static final int SYNC_OK = 0;
John Reckf9be7792014-05-02 18:21:16 -070064 // Needs a ViewRoot invalidate
John Reckcd028f32014-06-24 08:44:29 -070065 private static final int SYNC_INVALIDATE_REQUIRED = 1 << 0;
John Reckf9be7792014-05-02 18:21:16 -070066
John Reckfe5e7b72014-05-23 17:42:28 -070067 private static final String[] VISUALIZERS = {
68 PROFILE_PROPERTY_VISUALIZE_BARS,
69 };
70
Alan Viveretteccb11e12014-07-08 16:04:02 -070071 // Size of the rendered content.
John Reckcec24ae2013-11-05 13:27:50 -080072 private int mWidth, mHeight;
Alan Viveretteccb11e12014-07-08 16:04:02 -070073
74 // Actual size of the drawing surface.
75 private int mSurfaceWidth, mSurfaceHeight;
76
77 // Insets between the drawing surface and rendered content. These are
78 // applied as translation when updating the root render node.
79 private int mInsetTop, mInsetLeft;
80
John Reck4f02bf42014-01-03 18:09:17 -080081 private long mNativeProxy;
John Reckf7d9c1d2014-04-09 10:01:03 -070082 private boolean mInitialized = false;
John Reckbc0cc022014-04-11 16:08:14 -070083 private RenderNode mRootNode;
John Reck18f16e62014-05-02 16:46:41 -070084 private Choreographer mChoreographer;
John Reckfe5e7b72014-05-23 17:42:28 -070085 private boolean mProfilingEnabled;
John Reckcec24ae2013-11-05 13:27:50 -080086
John Reckb8802b12014-06-16 15:28:50 -070087 ThreadedRenderer(Context context, boolean translucent) {
John Recke45b1fd2014-04-15 09:50:16 -070088 long rootNodePtr = nCreateRootRenderNode();
89 mRootNode = RenderNode.adopt(rootNodePtr);
John Reckbc0cc022014-04-11 16:08:14 -070090 mRootNode.setClipToBounds(false);
John Recke45b1fd2014-04-15 09:50:16 -070091 mNativeProxy = nCreateProxy(translucent, rootNodePtr);
John Reck18f16e62014-05-02 16:46:41 -070092
John Reck3b202512014-06-23 13:13:08 -070093 AtlasInitializer.sInstance.init(context, mNativeProxy);
94
John Reck18f16e62014-05-02 16:46:41 -070095 // Setup timing
96 mChoreographer = Choreographer.getInstance();
97 nSetFrameInterval(mNativeProxy, mChoreographer.getFrameIntervalNanos());
John Reckfe5e7b72014-05-23 17:42:28 -070098
99 loadSystemProperties();
John Reckcec24ae2013-11-05 13:27:50 -0800100 }
101
102 @Override
John Reckf47a5942014-06-30 16:20:04 -0700103 void destroy() {
John Reckf7d9c1d2014-04-09 10:01:03 -0700104 mInitialized = false;
105 updateEnabledState(null);
John Reckfae904d2014-04-14 11:01:57 -0700106 nDestroyCanvasAndSurface(mNativeProxy);
John Reckcec24ae2013-11-05 13:27:50 -0800107 }
108
John Reckf7d9c1d2014-04-09 10:01:03 -0700109 private void updateEnabledState(Surface surface) {
110 if (surface == null || !surface.isValid()) {
111 setEnabled(false);
112 } else {
113 setEnabled(mInitialized);
114 }
115 }
116
John Reckcec24ae2013-11-05 13:27:50 -0800117 @Override
118 boolean initialize(Surface surface) throws OutOfResourcesException {
John Reckf7d9c1d2014-04-09 10:01:03 -0700119 mInitialized = true;
120 updateEnabledState(surface);
Dan Stoza5795d642014-06-20 13:01:36 -0700121 boolean status = nInitialize(mNativeProxy, surface);
122 surface.allocateBuffers();
123 return status;
John Reckcec24ae2013-11-05 13:27:50 -0800124 }
125
126 @Override
127 void updateSurface(Surface surface) throws OutOfResourcesException {
John Reckf7d9c1d2014-04-09 10:01:03 -0700128 updateEnabledState(surface);
John Reck4f02bf42014-01-03 18:09:17 -0800129 nUpdateSurface(mNativeProxy, surface);
John Reckcec24ae2013-11-05 13:27:50 -0800130 }
131
132 @Override
John Reckf7d9c1d2014-04-09 10:01:03 -0700133 void pauseSurface(Surface surface) {
134 nPauseSurface(mNativeProxy, surface);
135 }
136
137 @Override
John Reckcec24ae2013-11-05 13:27:50 -0800138 void destroyHardwareResources(View view) {
John Reck4f02bf42014-01-03 18:09:17 -0800139 destroyResources(view);
John Reckf47a5942014-06-30 16:20:04 -0700140 nDestroyHardwareResources(mNativeProxy);
John Reck4f02bf42014-01-03 18:09:17 -0800141 }
142
143 private static void destroyResources(View view) {
144 view.destroyHardwareResources();
145
146 if (view instanceof ViewGroup) {
147 ViewGroup group = (ViewGroup) view;
148
149 int count = group.getChildCount();
150 for (int i = 0; i < count; i++) {
151 destroyResources(group.getChildAt(i));
152 }
153 }
John Reckcec24ae2013-11-05 13:27:50 -0800154 }
155
156 @Override
157 void invalidate(Surface surface) {
John Reck4f02bf42014-01-03 18:09:17 -0800158 updateSurface(surface);
John Reckcec24ae2013-11-05 13:27:50 -0800159 }
160
161 @Override
John Reck918ad522014-06-27 14:45:25 -0700162 void detachSurfaceTexture(long hardwareLayer) {
163 nDetachSurfaceTexture(mNativeProxy, hardwareLayer);
John Reckcec24ae2013-11-05 13:27:50 -0800164 }
165
166 @Override
Alan Viveretteccb11e12014-07-08 16:04:02 -0700167 void setup(int width, int height, Rect surfaceInsets, float lightX, float lightY, float lightZ,
168 float lightRadius) {
John Reckcec24ae2013-11-05 13:27:50 -0800169 mWidth = width;
170 mHeight = height;
Alan Viveretteccb11e12014-07-08 16:04:02 -0700171 if (surfaceInsets != null) {
172 mInsetLeft = surfaceInsets.left;
173 mInsetTop = surfaceInsets.top;
174 mSurfaceWidth = width + mInsetLeft + surfaceInsets.right;
175 mSurfaceHeight = height + mInsetTop + surfaceInsets.bottom;
176 } else {
177 mInsetLeft = 0;
178 mInsetTop = 0;
179 mSurfaceWidth = width;
180 mSurfaceHeight = height;
181 }
182 mRootNode.setLeftTopRightBottom(-mInsetLeft, -mInsetTop, mSurfaceWidth, mSurfaceHeight);
183 nSetup(mNativeProxy, mSurfaceWidth, mSurfaceHeight, lightX, lightY, lightZ, lightRadius);
John Reckcec24ae2013-11-05 13:27:50 -0800184 }
185
186 @Override
John Reck63a06672014-05-07 13:45:54 -0700187 void setOpaque(boolean opaque) {
188 nSetOpaque(mNativeProxy, opaque);
189 }
190
191 @Override
John Reckcec24ae2013-11-05 13:27:50 -0800192 int getWidth() {
193 return mWidth;
194 }
195
196 @Override
197 int getHeight() {
198 return mHeight;
199 }
200
201 @Override
John Reckfe5e7b72014-05-23 17:42:28 -0700202 void dumpGfxInfo(PrintWriter pw, FileDescriptor fd) {
203 pw.flush();
204 nDumpProfileInfo(mNativeProxy, fd);
John Reckcec24ae2013-11-05 13:27:50 -0800205 }
206
John Reckfe5e7b72014-05-23 17:42:28 -0700207 private static int search(String[] values, String value) {
208 for (int i = 0; i < values.length; i++) {
209 if (values[i].equals(value)) return i;
210 }
211 return -1;
212 }
213
214 private static boolean checkIfProfilingRequested() {
215 String profiling = SystemProperties.get(HardwareRenderer.PROFILE_PROPERTY);
216 int graphType = search(VISUALIZERS, profiling);
217 return (graphType >= 0) || Boolean.parseBoolean(profiling);
John Reckcec24ae2013-11-05 13:27:50 -0800218 }
219
220 @Override
221 boolean loadSystemProperties() {
John Reckfe5e7b72014-05-23 17:42:28 -0700222 boolean changed = nLoadSystemProperties(mNativeProxy);
223 boolean wantProfiling = checkIfProfilingRequested();
224 if (wantProfiling != mProfilingEnabled) {
225 mProfilingEnabled = wantProfiling;
226 changed = true;
227 }
228 return changed;
John Reckcec24ae2013-11-05 13:27:50 -0800229 }
230
John Reckbc0cc022014-04-11 16:08:14 -0700231 private void updateRootDisplayList(View view, HardwareDrawCallbacks callbacks) {
John Reckcec24ae2013-11-05 13:27:50 -0800232 view.mPrivateFlags |= View.PFLAG_DRAWN;
233
234 view.mRecreateDisplayList = (view.mPrivateFlags & View.PFLAG_INVALIDATED)
235 == View.PFLAG_INVALIDATED;
236 view.mPrivateFlags &= ~View.PFLAG_INVALIDATED;
237
238 Trace.traceBegin(Trace.TRACE_TAG_VIEW, "getDisplayList");
Alan Viveretteccb11e12014-07-08 16:04:02 -0700239 HardwareCanvas canvas = mRootNode.start(mSurfaceWidth, mSurfaceHeight);
John Reck05e85842014-04-23 14:48:28 -0700240 try {
John Reck86faf9e2014-05-19 13:19:07 -0700241 canvas.save();
Alan Viveretteccb11e12014-07-08 16:04:02 -0700242 canvas.translate(mInsetLeft, mInsetTop);
Alan Viveretted5b2ec42014-05-17 16:34:09 -0700243 callbacks.onHardwarePreDraw(canvas);
Chris Craika7090e02014-06-20 16:01:00 -0700244 canvas.drawRenderNode(view.getDisplayList());
John Reck05e85842014-04-23 14:48:28 -0700245 callbacks.onHardwarePostDraw(canvas);
John Reck86faf9e2014-05-19 13:19:07 -0700246 canvas.restore();
John Reck05e85842014-04-23 14:48:28 -0700247 } finally {
248 mRootNode.end(canvas);
249 Trace.traceEnd(Trace.TRACE_TAG_VIEW);
250 }
John Reckcec24ae2013-11-05 13:27:50 -0800251
252 view.mRecreateDisplayList = false;
John Reckbc0cc022014-04-11 16:08:14 -0700253 }
254
255 @Override
John Recke4267ea2014-06-03 15:53:15 -0700256 void draw(View view, AttachInfo attachInfo, HardwareDrawCallbacks callbacks) {
John Reckbc0cc022014-04-11 16:08:14 -0700257 attachInfo.mIgnoreDirtyState = true;
John Reck18f16e62014-05-02 16:46:41 -0700258 long frameTimeNanos = mChoreographer.getFrameTimeNanos();
John Reck315c3292014-05-09 19:21:04 -0700259 attachInfo.mDrawingTime = frameTimeNanos / TimeUtils.NANOS_PER_MS;
John Reckbc0cc022014-04-11 16:08:14 -0700260
John Reckfe5e7b72014-05-23 17:42:28 -0700261 long recordDuration = 0;
262 if (mProfilingEnabled) {
263 recordDuration = System.nanoTime();
264 }
265
John Reckbc0cc022014-04-11 16:08:14 -0700266 updateRootDisplayList(view, callbacks);
John Reckcec24ae2013-11-05 13:27:50 -0800267
John Reckfe5e7b72014-05-23 17:42:28 -0700268 if (mProfilingEnabled) {
269 recordDuration = System.nanoTime() - recordDuration;
270 }
271
John Reck6313b922014-04-16 18:59:21 -0700272 attachInfo.mIgnoreDirtyState = false;
273
John Reckf9be7792014-05-02 18:21:16 -0700274 int syncResult = nSyncAndDrawFrame(mNativeProxy, frameTimeNanos,
John Recke4267ea2014-06-03 15:53:15 -0700275 recordDuration, view.getResources().getDisplayMetrics().density);
John Reckf9be7792014-05-02 18:21:16 -0700276 if ((syncResult & SYNC_INVALIDATE_REQUIRED) != 0) {
277 attachInfo.mViewRootImpl.invalidate();
278 }
John Reckcec24ae2013-11-05 13:27:50 -0800279 }
280
John Reck3b202512014-06-23 13:13:08 -0700281 static void invokeFunctor(long functor, boolean waitForCompletion) {
282 nInvokeFunctor(functor, waitForCompletion);
John Reck0d1f6342014-03-28 20:30:27 -0700283 }
284
285 @Override
John Reck19b6bcf2014-02-14 20:03:38 -0800286 HardwareLayer createTextureLayer() {
287 long layer = nCreateTextureLayer(mNativeProxy);
288 return HardwareLayer.adoptTextureLayer(this, layer);
289 }
290
291 @Override
John Reck19b6bcf2014-02-14 20:03:38 -0800292 boolean copyLayerInto(final HardwareLayer layer, final Bitmap bitmap) {
293 return nCopyLayerInto(mNativeProxy,
294 layer.getDeferredLayerUpdater(), bitmap.mNativeBitmap);
295 }
296
297 @Override
298 void pushLayerUpdate(HardwareLayer layer) {
John Reckd72e0a32014-05-29 18:56:11 -0700299 nPushLayerUpdate(mNativeProxy, layer.getDeferredLayerUpdater());
John Reck19b6bcf2014-02-14 20:03:38 -0800300 }
301
302 @Override
John Reck19b6bcf2014-02-14 20:03:38 -0800303 void onLayerDestroyed(HardwareLayer layer) {
John Reckd72e0a32014-05-29 18:56:11 -0700304 nCancelLayerUpdate(mNativeProxy, layer.getDeferredLayerUpdater());
John Reck19b6bcf2014-02-14 20:03:38 -0800305 }
306
307 @Override
John Reckcec24ae2013-11-05 13:27:50 -0800308 void setName(String name) {
John Reckcec24ae2013-11-05 13:27:50 -0800309 }
310
John Reck4f02bf42014-01-03 18:09:17 -0800311 @Override
John Reck28ad7b52014-04-07 16:59:25 -0700312 void fence() {
313 nFence(mNativeProxy);
314 }
315
316 @Override
John Reckf47a5942014-06-30 16:20:04 -0700317 void stopDrawing() {
318 nStopDrawing(mNativeProxy);
319 }
320
321 @Override
John Recka5dda642014-05-22 15:43:54 -0700322 public void notifyFramePending() {
323 nNotifyFramePending(mNativeProxy);
324 }
325
326 @Override
John Reck4f02bf42014-01-03 18:09:17 -0800327 protected void finalize() throws Throwable {
328 try {
329 nDeleteProxy(mNativeProxy);
John Reck0ed751d2014-04-08 14:10:17 -0700330 mNativeProxy = 0;
John Reck4f02bf42014-01-03 18:09:17 -0800331 } finally {
332 super.finalize();
John Reckcec24ae2013-11-05 13:27:50 -0800333 }
334 }
335
John Reckf47a5942014-06-30 16:20:04 -0700336 static void trimMemory(int level) {
337 nTrimMemory(level);
John Reck84a4c882014-05-30 14:34:03 -0700338 }
339
John Reck66f0be62014-05-13 13:39:31 -0700340 private static class AtlasInitializer {
341 static AtlasInitializer sInstance = new AtlasInitializer();
342
343 private boolean mInitialized = false;
344
345 private AtlasInitializer() {}
346
John Reck3b202512014-06-23 13:13:08 -0700347 synchronized void init(Context context, long renderProxy) {
John Reck66f0be62014-05-13 13:39:31 -0700348 if (mInitialized) return;
349 IBinder binder = ServiceManager.getService("assetatlas");
350 if (binder == null) return;
351
352 IAssetAtlas atlas = IAssetAtlas.Stub.asInterface(binder);
353 try {
354 if (atlas.isCompatible(android.os.Process.myPpid())) {
355 GraphicBuffer buffer = atlas.getBuffer();
356 if (buffer != null) {
357 long[] map = atlas.getMap();
358 if (map != null) {
John Reckb8802b12014-06-16 15:28:50 -0700359 // TODO Remove after fixing b/15425820
360 validateMap(context, map);
John Reck3b202512014-06-23 13:13:08 -0700361 nSetAtlas(renderProxy, buffer, map);
John Reck66f0be62014-05-13 13:39:31 -0700362 mInitialized = true;
363 }
364 // If IAssetAtlas is not the same class as the IBinder
365 // we are using a remote service and we can safely
366 // destroy the graphic buffer
367 if (atlas.getClass() != binder.getClass()) {
368 buffer.destroy();
369 }
370 }
371 }
372 } catch (RemoteException e) {
373 Log.w(LOG_TAG, "Could not acquire atlas", e);
374 }
375 }
John Reckb8802b12014-06-16 15:28:50 -0700376
377 private static void validateMap(Context context, long[] map) {
378 Log.d("Atlas", "Validating map...");
379 HashSet<Long> preloadedPointers = new HashSet<Long>();
380
381 // We only care about drawables that hold bitmaps
382 final Resources resources = context.getResources();
383 final LongSparseArray<Drawable.ConstantState> drawables = resources.getPreloadedDrawables();
384
385 final int count = drawables.size();
386 for (int i = 0; i < count; i++) {
387 final Bitmap bitmap = drawables.valueAt(i).getBitmap();
388 if (bitmap != null && bitmap.getConfig() == Bitmap.Config.ARGB_8888) {
389 preloadedPointers.add(bitmap.mNativeBitmap);
390 }
391 }
392
393 for (int i = 0; i < map.length; i += 4) {
394 if (!preloadedPointers.contains(map[i])) {
395 Log.w("Atlas", String.format("Pointer 0x%X, not in getPreloadedDrawables?", map[i]));
396 map[i] = 0;
397 }
398 }
399 }
John Reck66f0be62014-05-13 13:39:31 -0700400 }
401
John Reck84a4c882014-05-30 14:34:03 -0700402 static native void setupShadersDiskCache(String cacheFile);
403
John Reck3b202512014-06-23 13:13:08 -0700404 private static native void nSetAtlas(long nativeProxy, GraphicBuffer buffer, long[] map);
John Reck4f02bf42014-01-03 18:09:17 -0800405
John Recke45b1fd2014-04-15 09:50:16 -0700406 private static native long nCreateRootRenderNode();
407 private static native long nCreateProxy(boolean translucent, long rootRenderNode);
John Reck4f02bf42014-01-03 18:09:17 -0800408 private static native void nDeleteProxy(long nativeProxy);
409
John Reck18f16e62014-05-02 16:46:41 -0700410 private static native void nSetFrameInterval(long nativeProxy, long frameIntervalNanos);
John Recke4280ba2014-05-05 16:39:37 -0700411 private static native boolean nLoadSystemProperties(long nativeProxy);
John Reck18f16e62014-05-02 16:46:41 -0700412
John Reck4f02bf42014-01-03 18:09:17 -0800413 private static native boolean nInitialize(long nativeProxy, Surface window);
414 private static native void nUpdateSurface(long nativeProxy, Surface window);
John Reckf7d9c1d2014-04-09 10:01:03 -0700415 private static native void nPauseSurface(long nativeProxy, Surface window);
Chris Craik797b95b2014-05-20 18:10:25 -0700416 private static native void nSetup(long nativeProxy, int width, int height,
417 float lightX, float lightY, float lightZ, float lightRadius);
John Reck63a06672014-05-07 13:45:54 -0700418 private static native void nSetOpaque(long nativeProxy, boolean opaque);
John Reckfe5e7b72014-05-23 17:42:28 -0700419 private static native int nSyncAndDrawFrame(long nativeProxy,
John Recke4267ea2014-06-03 15:53:15 -0700420 long frameTimeNanos, long recordDuration, float density);
John Reckfae904d2014-04-14 11:01:57 -0700421 private static native void nDestroyCanvasAndSurface(long nativeProxy);
John Reck4f02bf42014-01-03 18:09:17 -0800422
John Reck3b202512014-06-23 13:13:08 -0700423 private static native void nInvokeFunctor(long functor, boolean waitForCompletion);
John Reck19b6bcf2014-02-14 20:03:38 -0800424
425 private static native long nCreateDisplayListLayer(long nativeProxy, int width, int height);
426 private static native long nCreateTextureLayer(long nativeProxy);
427 private static native boolean nCopyLayerInto(long nativeProxy, long layer, long bitmap);
John Reckd72e0a32014-05-29 18:56:11 -0700428 private static native void nPushLayerUpdate(long nativeProxy, long layer);
429 private static native void nCancelLayerUpdate(long nativeProxy, long layer);
John Reck918ad522014-06-27 14:45:25 -0700430 private static native void nDetachSurfaceTexture(long nativeProxy, long layer);
John Reck28ad7b52014-04-07 16:59:25 -0700431
John Reckf47a5942014-06-30 16:20:04 -0700432 private static native void nDestroyHardwareResources(long nativeProxy);
433 private static native void nTrimMemory(int level);
John Recke1628b72014-05-23 15:11:19 -0700434
John Reck28ad7b52014-04-07 16:59:25 -0700435 private static native void nFence(long nativeProxy);
John Reckf47a5942014-06-30 16:20:04 -0700436 private static native void nStopDrawing(long nativeProxy);
John Recka5dda642014-05-22 15:43:54 -0700437 private static native void nNotifyFramePending(long nativeProxy);
John Reckfe5e7b72014-05-23 17:42:28 -0700438
439 private static native void nDumpProfileInfo(long nativeProxy, FileDescriptor fd);
John Reckcec24ae2013-11-05 13:27:50 -0800440}