Skip to content

Instantly share code, notes, and snippets.

View vvuk's full-sized avatar

Vladimir Vukicevic vvuk

  • Unity Technologies
  • San Francisco, CA
  • X @vvuk
View GitHub Profile
@vvuk
vvuk / ArrayBenchmark.java
Created October 6, 2011 02:25
two NIO/Java array benchmarks
/* javac ArrayBenchmark.java
* java -Xbootclasspath/a:. ArrayBenchmark
*/
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.IntBuffer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@vvuk
vvuk / buftest.html
Created October 6, 2011 02:28
buftest.html
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
function go() {
var size = 10 * 1000 * 1000;
var ibuf = new Int32Array(size);
var t0, t1;
@vvuk
vvuk / install-ubuntu
Last active March 1, 2018 06:58
Install Ubuntu 13.04 on Chromebook
#!/bin/bash
#
# Version 0.2, for Ubuntu 13.04 (Raring)
#
# Based on Chrubuntu 34v87 script
BASE_IMAGE_FILE="http://mirrors.med.harvard.edu/ubuntu-cdimage/lubuntu/releases/13.04/release/lubuntu-13.04-preinstalled-desktop-armhf+ac100.tar.gz"
# fw_type will always be developer for Mario.
# Alex and ZGB need the developer BIOS installed though.
diff --git a/src/library.js b/src/library.js
index d0f73fd..955755e 100644
--- a/src/library.js
+++ b/src/library.js
@@ -6743,11 +6743,12 @@ LibraryManager.library = {
pthread_key_create: function(key, destructor) {
if (!_pthread_key_create.keys) _pthread_key_create.keys = {};
- _pthread_key_create.keys[key] = null;
+ // values start at 0
diff --git a/client.mk b/client.mk
index de4de4c..726653b 100644
--- a/client.mk
+++ b/client.mk
@@ -78,7 +78,6 @@ ifdef CONFIG_GUESS_SCRIPT
CONFIG_GUESS := $(shell $(CONFIG_GUESS_SCRIPT))
endif
-
####################################
@vvuk
vvuk / skia-work.patch
Created October 31, 2013 15:55
skia hacking
diff --git a/gfx/2d/2D.h b/gfx/2d/2D.h
index c02d319..f207459 100644
--- a/gfx/2d/2D.h
+++ b/gfx/2d/2D.h
@@ -879,6 +879,10 @@ public:
return mUserData.Get(key);
}
+ virtual void *GetBackendData(BackendDataType aBackendDataType) {
+ return nullptr;
@vvuk
vvuk / skiagl-stuff.patch
Created November 7, 2013 02:39
SkiaGL hacking patch
diff --git a/content/canvas/src/CanvasRenderingContext2D.cpp b/content/canvas/src/CanvasRenderingContext2D.cpp
index 35c5059..bdc9a50 100644
--- a/content/canvas/src/CanvasRenderingContext2D.cpp
+++ b/content/canvas/src/CanvasRenderingContext2D.cpp
@@ -120,6 +120,8 @@ using namespace mozilla::gfx;
using namespace mozilla::ipc;
using namespace mozilla::layers;
+using mozilla::gl::GLContextSkiaUtils;
+
(require 'filecache)
(defun file-cache-add-from-file (file &optional prefix)
"Read filenames from FILE, one line per file, and add them to
the file cache. If prefix is given, stick that prefix at the
start of every line before adding to file cache."
(interactive "fAdd files from file: ")
(set-buffer (get-buffer-create file-cache-buffer))
(erase-buffer)
(insert-file file)
(if (not (eq prefix nil))
@vvuk
vvuk / skia-changes.patch
Created December 4, 2013 07:05
Second is changes to skia itself to get it to build; largely removing platform specific stuff that we don't want/can't build. Also removing things like forcing a build of images from effects. No idea if the result will link yet.
diff -ru /c/proj/skia/gyp/common_conditions.gypi gfx/skia/trunk/gyp/common_conditions.gypi
--- /c/proj/skia/gyp/common_conditions.gypi 2013-12-02 14:54:18 +0800
+++ gfx/skia/trunk/gyp/common_conditions.gypi 2013-12-04 14:25:16 +0800
@@ -112,6 +112,15 @@
},
},
}],
+ [ 'skia_shared_lib', {
+ 'cflags': [
+ '-fPIC',
commit 6746d57c33786267787be4cf19edbbc05e0b682f
Author: Vladimir Vukicevic <vladimir@pobox.com>
Date: Mon Mar 10 14:34:57 2014 -0400
Implement SimpleTiledContentClient and friends
diff --git a/b2g/chrome/content/settings.js b/b2g/chrome/content/settings.js
index 73257c1..92a465b 100644
--- a/b2g/chrome/content/settings.js
+++ b/b2g/chrome/content/settings.js