Skip to content

Instantly share code, notes, and snippets.

View arajkumar's full-sized avatar
🏡

Arunprasad Rajkumar arajkumar

🏡
View GitHub Profile
void paintEvent (QPaintEvent * event)
{
qDebug()<<__PRETTY_FUNCTION__;
QPainter p1(this);
{
QPainter p(this);
p.setCompositionMode(QPainter::CompositionMode_Clear);
p.fillRect(QRect(0,0,100,100),Qt::transparent);
}
p1.setCompositionMode(QPainter::CompositionMode_Clear);
#include <QtWidgets/QApplication>
#include <QtWidgets/QWidget>
#include <QTimer>
#include <QDebug>
class MyQWidget: public QWidget, public QTimer
{
friend class MyTimer;
public:
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
index 2af19ed..bd21adb 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
@@ -90,8 +90,14 @@ QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFr
, marginWidth(0)
, marginHeight(0)
{
- frameLoaderClient = new FrameLoaderClientQt();
- frame = Frame::create(page, ownerElement, frameLoaderClient);
@arajkumar
arajkumar / GLES2 Compilation Error.patch
Last active December 25, 2015 05:19
GLES2 Compilation Error
diff --git a/Source/WebCore/platform/graphics/OpenGLESShims.h b/Source/WebCore/platform/graphics/OpenGLESShims.h
index b495814..9683042 100644
--- a/Source/WebCore/platform/graphics/OpenGLESShims.h
+++ b/Source/WebCore/platform/graphics/OpenGLESShims.h
@@ -44,8 +44,12 @@
#define glIsRenderbufferEXT glIsRenderbuffer
#define glIsFramebufferEXT glIsFramebuffer
#define glGenerateMipmapEXT glGenerateMipmap
+#ifndef GL_COLOR_ATTACHMENT0_EXT
#define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0
@arajkumar
arajkumar / nix_GLES2.patch
Created October 11, 2013 05:17
Fix for GLES2 compilation error
diff --git a/Source/WebCore/platform/graphics/OpenGLESShims.h b/Source/WebCore/platform/graphics/OpenGLESShims.h
index b495814..9683042 100644
--- a/Source/WebCore/platform/graphics/OpenGLESShims.h
+++ b/Source/WebCore/platform/graphics/OpenGLESShims.h
@@ -44,8 +44,12 @@
#define glIsRenderbufferEXT glIsRenderbuffer
#define glIsFramebufferEXT glIsFramebuffer
#define glGenerateMipmapEXT glGenerateMipmap
+#ifndef GL_COLOR_ATTACHMENT0_EXT
#define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0
diff --git a/Source/cmake/FindHarfBuzz.cmake b/Source/cmake/FindHarfBuzz.cmake
index f8ca605..6e77478 100644
--- a/Source/cmake/FindHarfBuzz.cmake
+++ b/Source/cmake/FindHarfBuzz.cmake
@@ -42,5 +42,14 @@ find_library(HARFBUZZ_LIBRARIES NAMES harfbuzz
HINTS ${PC_HARFBUZZ_LIBRARY_DIRS} ${PC_HARFBUZZ_LIBDIR}
)
+# HarfBuzz 0.9.18 split ICU support into a separate library harfbuzz-icu.
+if ("PC_HARFBUZZ_VERSION" VERSION_GREATER "0.9.17")
@arajkumar
arajkumar / gist:7546634
Created November 19, 2013 15:01
atk error 2.5.91
../../webkit/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceDocument.cpp: In function 'const gchar* webkitAccessibleDocumentGetLocale(AtkDocument*)':
../../webkit/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:114:61: error: 'atk_object_get_object_locale' was not declared in this scope
return atk_object_get_object_locale(ATK_OBJECT(document));
^
../../webkit/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:115:1: warning: control reaches end of non-void function [-Wreturn-type]
@arajkumar
arajkumar / debug.h
Last active December 29, 2015 01:49
My Simple debugging statement :)
#pragma once
#ifndef ARDEBUG_H
#define ARDEBUG_H
#include <stdio.h>
#include <string.h>
static const char* s_fileName;
#define AR_PRINT(type,x...) do { s_fileName || (s_fileName = strrchr(__FILE__,'/') + 1) || (s_fileName = __FILE__); printf("%-16.32s:%6.6d:%6.6d %s *** ",s_fileName,__LINE__,getpid(), type); printf(x); printf("\n"); } while(0)
#define AR_DEBUG(x...) AR_PRINT("",x)
#endif
// interface
namespace blaze {
class ProcessStatusProvider {
class Status {
pid_t pid_;
size_t private_mem_;
size_t shared_mem_;
size_t gpu_mem_;
bool is_extended;
ps -AL -o pid,tid,rtprio,comm
for i in `ps -AL | cut -d ' ' -f4`; do sudo chrt -r -p 95 $i; done
for i in `ps -L | cut -d ' ' -f4`; do sudo taskset -p 2 $i; done
sudo bash -c 'echo "0" >/sys/devices/system/cpu/cpu1/online'
sudo bash -c 'echo "-1"> /proc/sys/kernel/sched_rt_runtime_us'
funcion cr() {
sudo chrt -r -p 19 $$
google-chrome --in-process-gpu --disable-extensions &