Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Unified Diff: media/tools/shader_bench/shader_bench.cc

Issue 7021014: GLContext no longer holds a pointer to a GLSurface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/tools/shader_bench/shader_bench.cc
===================================================================
--- media/tools/shader_bench/shader_bench.cc (revision 86168)
+++ media/tools/shader_bench/shader_bench.cc (working copy)
@@ -135,8 +135,8 @@
scoped_ptr<media::Window> window(new media::Window(width, height));
gfx::GLSurface* surface =
gfx::GLSurface::CreateViewGLSurface(window->PluginWindow());
- gfx::GLContext* context = gfx::GLContext::CreateGLContext(surface, NULL);
- context->MakeCurrent();
+ gfx::GLContext* context = gfx::GLContext::CreateGLContext(NULL, surface);
+ context->MakeCurrent(surface);
// This sets D3DPRESENT_INTERVAL_IMMEDIATE on Windows.
context->SetSwapInterval(0);
@@ -155,7 +155,7 @@
for (int i = 0; i < kNumPainters; i++) {
scoped_ptr<GPUPainter> painter(painters[i].painter);
painter->LoadFrames(&frames);
- painter->SetGLContext(context);
+ painter->SetGLContext(surface, context);
painter->Initialize(width, height);
printf("Running %s tests...", painters[i].name);
RunTest(window.get(), painter.get());

Powered by Google App Engine
This is Rietveld 408576698