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

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

Issue 22979002: Remove unnecessary checks and fix shader_bench. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 4 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
« no previous file with comments | « content/renderer/media/peer_connection_tracker.cc ('k') | media/video/capture/win/filter_base_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/shader_bench/shader_bench.cc
diff --git a/media/tools/shader_bench/shader_bench.cc b/media/tools/shader_bench/shader_bench.cc
index b26733ce03263282f7c53966bc009d8d4825fea9..0b4236f1eb1043dc3538ac0b1b1bb89d5d415960 100644
--- a/media/tools/shader_bench/shader_bench.cc
+++ b/media/tools/shader_bench/shader_bench.cc
@@ -13,6 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
+#include "media/base/media.h"
#include "media/base/video_frame.h"
#include "media/tools/shader_bench/cpu_color_painter.h"
#include "media/tools/shader_bench/gpu_color_painter.h"
@@ -127,18 +128,19 @@ int main(int argc, char** argv) {
// Initialize window and graphics context.
base::AtExitManager at_exit_manager;
+ media::InitializeMediaLibraryForTesting();
gfx::GLSurface::InitializeOneOff();
scoped_ptr<media::Window> window(new media::Window(width, height));
- gfx::GLSurface* surface =
- gfx::GLSurface::CreateViewGLSurface(window->PluginWindow()).get();
- gfx::GLContext* context = gfx::GLContext::CreateGLContext(
- NULL, surface, gfx::PreferDiscreteGpu).get();
- context->MakeCurrent(surface);
+ scoped_refptr<gfx::GLSurface> surface =
+ gfx::GLSurface::CreateViewGLSurface(window->PluginWindow());
+ scoped_refptr<gfx::GLContext> context = gfx::GLContext::CreateGLContext(
+ NULL, surface.get(), gfx::PreferDiscreteGpu);
+ context->MakeCurrent(surface.get());
// This sets D3DPRESENT_INTERVAL_IMMEDIATE on Windows.
context->SetSwapInterval(0);
// Initialize and name GPU painters.
- static const struct {
+ const struct {
const char* name;
GPUPainter* painter;
} painters[] = {
« no previous file with comments | « content/renderer/media/peer_connection_tracker.cc ('k') | media/video/capture/win/filter_base_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698