Skip to content

Instantly share code, notes, and snippets.

@loyso
loyso / StructureOfArrays.cpp
Created December 27, 2017 06:52
Both worlds!
// StructureOfArrays.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <cassert>
#include <vector>
struct Vec3 {
float x = 0;
@loyso
loyso / my_texture_copy.cc
Last active August 29, 2015 14:05
Chromium cc::Layer texture copying
void MyTest::RequestTextureCopy() {
base::TimeTicks start_time = base::TimeTicks::Now();
content::ContentViewCoreImpl* content_view_core = GetContentViewCoreImpl();
DCHECK(content_view_core);
scoped_refptr<cc::DelegatedRendererLayer> readback_layer =
content_view_core->CreateDelegatedRendererLayerForFrameProvider();
ui::WindowAndroidCompositor* compositor =
coped_refptr<cc::ContextProvider> CompositorImpl::OffscreenContextProvider() {
// There is no support for offscreen contexts, or compositor filters that
// would require them in this compositor instance. If they are needed,
// then implement a context provider that provides contexts from
// ImageTransportSurfaceAndroid.
return NULL;
}