Skip to content

Instantly share code, notes, and snippets.

View mstange's full-sized avatar

Markus Stange mstange

View GitHub Profile
@mstange
mstange / main.mm
Created June 17, 2016 15:07
OS X sample that creates and leaks an IOSurface, draws a bunch of circles into it, attaches it to a texture and presents it using an NSOpenGLContext
/**
* clang++ main.mm -framework Cocoa -framework OpenGL -framework IOSurface -o test && ./test
**/
#import <Cocoa/Cocoa.h>
#include <OpenGL/gl.h>
@interface TestView: NSView
{
NSOpenGLContext* mContext;
@mstange
mstange / keyboardlayoutinfo.txt
Created April 6, 2017 22:28
Keyboard layout info with in VS Code for "DVORAK-QWERTYCMD"
Layout info:
{
"id": "com.apple.keylayout.DVORAK-QWERTYCMD",
"lang": "en"
}
isUSStandard: false
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| KeyA | a | A | | A | a | A | [KeyA] | |
@mstange
mstange / funcstacks.md
Last active May 17, 2017 20:47
funcStack introduction

Frames, funcs, stacks and funcStacks in C++

Example code

0x01  int main() {
0x02    for (int i = 0; i < 10; i++) {
0x03      doSomething(i);
0x04    }
0x05 
@mstange
mstange / create-filter-resource-storage.diff
Created August 2, 2018 17:31
Old patches from August 2014 that aim to keep FilterNode objects alive across paints
# HG changeset patch
# Parent 6e24234c471ead579c04eb83d9d69d3b7e132977
# User Markus Stange <[email protected]>
diff --git a/gfx/src/FilterSupport.cpp b/gfx/src/FilterSupport.cpp
--- a/gfx/src/FilterSupport.cpp
+++ b/gfx/src/FilterSupport.cpp
@@ -1132,23 +1132,23 @@ UpdatePrimitiveFilters(const FilterPrimi
}
}
@mstange
mstange / gradle focus build.log
Created August 8, 2018 22:13
./gradlew clean app:assembleFocusArmDebug
Markuss-MacBook-Pro:code mstange$ git clone git clone https://github.com/mozilla-mobile/focus-android
Markuss-MacBook-Pro:code mstange$ git clone https://github.com/mozilla-mobile/focus-android
Cloning into 'focus-android'...
remote: Counting objects: 28417, done.
remote: Compressing objects: 100% (84/84), done.
remote: Total 28417 (delta 53), reused 110 (delta 43), pack-reused 28258
Receiving objects: 100% (28417/28417), 157.92 MiB | 4.34 MiB/s, done.
Resolving deltas: 100% (16073/16073), done.
Markuss-MacBook-Pro:code mstange$ cd focus-android/
Markuss-MacBook-Pro:focus-android mstange$ ./gradlew clean app:assembleFocusArmDebug
@mstange
mstange / mozilla-central-geckoview-focus.diff
Created August 16, 2018 17:48
Patch to focus that makes it use a recent GeckoView from mozilla-central
diff --git a/app/build.gradle b/app/build.gradle
index f3c9954f..fd84f565 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -144,17 +144,17 @@ repositories {
// Remember the version of the artifacts. In the example above that's: 61.0.20180611134439
// ARM GeckoView builds
- url "https://index.taskcluster.net/v1/task/gecko.v2.mozilla-beta.revision" +
+ url "https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.revision" +
@mstange
mstange / focus-remote-profiling-nightly.diff
Last active August 16, 2018 18:53
Patch for Focus with remote profiling support, using GeckoView from mozilla-central Nightly
diff --git a/app/build.gradle b/app/build.gradle
index f3c9954f..afe20096 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -144,17 +144,17 @@ repositories {
// Remember the version of the artifacts. In the example above that's: 61.0.20180611134439
// ARM GeckoView builds
- url "https://index.taskcluster.net/v1/task/gecko.v2.mozilla-beta.revision" +
+ url "https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.nightly.revision" +
changeset: 507540:45049f022ac7
user: Markus Stange <[email protected]>
date: Mon Aug 13 16:09:30 2018 -0400
summary: CoreAnimation patch from tnikkel
diff --git a/gfx/2d/MacIOSurface.cpp b/gfx/2d/MacIOSurface.cpp
--- a/gfx/2d/MacIOSurface.cpp
+++ b/gfx/2d/MacIOSurface.cpp
@@ -64,16 +64,17 @@ IOSurfaceContextGetSurfaceFunc MacIOS
CVPixelBufferGetIOSurfaceFunc MacIOSurfaceLib::sCVPixelBufferGetIOSurface;
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE HTML>
<html>
<title>Use two different pieces from the sourceImage in two different filter nodes</title>
<head>
<style>
.filtered {
# HG changeset patch
# User Markus Stange <[email protected]>
# Date 1548379388 18000
# Thu Jan 24 20:23:08 2019 -0500
# Node ID e442cd9c43e361fec584d473888cbf07b5910f1e
# Parent 19bfb22ffae28a0a6ec449064daff863213269a6
Bug 1514007 - Annotate <script> evaluation profiler labels with async/defer. r?smaug
This also moves the label from ScriptLoader::ProcessScriptElement to
ScriptLoader::EvaluateScript so that it also kicks in for scripts that are run