diff options
author | Siva Velusamy <vsiva@google.com> | 2012-08-14 13:13:45 -0700 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2012-08-14 15:17:58 -0700 |
commit | ad52c4a80c66b533c64231a3dbfc4fbf9100fe1a (patch) | |
tree | e482b4fea5db15f89267087741e72edd804ee0e5 /eclipse/plugins/com.android.ide.eclipse.gldebugger | |
parent | 85e2339a4c4fd7388d6aff6523bbd98a2e3929d3 (diff) | |
download | sdk-ad52c4a80c66b533c64231a3dbfc4fbf9100fe1a.zip sdk-ad52c4a80c66b533c64231a3dbfc4fbf9100fe1a.tar.gz sdk-ad52c4a80c66b533c64231a3dbfc4fbf9100fe1a.tar.bz2 |
gltrace: Skip framebuffers that cannot be retrieved.
Rather than failing to parse the entire file, just ignore the
fb image if it can't be parsed. This should allow viewing the rest
of the data in the trace except for just the image.
Change-Id: I0d875cf45e09a29022b5b9a18d33601bb92225a5
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.gldebugger')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/ProtoBufUtils.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/ProtoBufUtils.java b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/ProtoBufUtils.java index ed6a277..48cca87 100644 --- a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/ProtoBufUtils.java +++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/ProtoBufUtils.java @@ -16,6 +16,7 @@ package com.android.ide.eclipse.gltrace; +import com.android.ide.eclipse.gldebugger.GlTracePlugin; import com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage; import org.eclipse.swt.graphics.Image; @@ -63,7 +64,15 @@ public class ProtoBufUtils { return null; } - ImageData imageData = getImageData(glMsg); + ImageData imageData = null; + try { + imageData = getImageData(glMsg); + } catch (Exception e) { + GlTracePlugin.getDefault().logMessage( + "Unexpected error while retrieving framebuffer image: " + e); + return null; + } + if (imageData == null) { return null; } @@ -80,7 +89,15 @@ public class ProtoBufUtils { return null; } - ImageData imageData = getImageData(glMsg); + ImageData imageData = null; + try { + imageData = getImageData(glMsg); + } catch (Exception e) { + GlTracePlugin.getDefault().logMessage( + "Unexpected error while retrieving framebuffer image: " + e); + return null; + } + if (imageData == null) { return null; } |