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

Unified Diff: ui/aura/bench/bench_main.cc

Issue 307963007: Removes ContextFactory::Get/SetInstance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix aura_bench Created 6 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
« no previous file with comments | « content/browser/compositor/image_transport_factory.cc ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/bench/bench_main.cc
diff --git a/ui/aura/bench/bench_main.cc b/ui/aura/bench/bench_main.cc
index 5152c7c9cd3f9ff9ed689d3e4d59f35c6b3e3971..b5dd3e75d3d9866b0770bf4d931f98bfbac3fe32 100644
--- a/ui/aura/bench/bench_main.cc
+++ b/ui/aura/bench/bench_main.cc
@@ -148,7 +148,10 @@ void ReturnMailbox(scoped_refptr<cc::ContextProvider> context_provider,
// A benchmark that adds a texture layer that is updated every frame.
class WebGLBench : public BenchCompositorObserver {
public:
- WebGLBench(Layer* parent, Compositor* compositor, int max_frames)
+ WebGLBench(ui::ContextFactory* context_factory,
+ Layer* parent,
+ Compositor* compositor,
+ int max_frames)
: BenchCompositorObserver(max_frames),
parent_(parent),
webgl_(ui::LAYER_TEXTURED),
@@ -177,8 +180,7 @@ class WebGLBench : public BenchCompositorObserver {
webgl_.SetBounds(bounds);
parent_->Add(&webgl_);
- context_provider_ =
- ui::ContextFactory::GetInstance()->SharedMainThreadContextProvider();
+ context_provider_ = context_factory->SharedMainThreadContextProvider();
gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
GLuint texture = 0;
gl->GenTextures(1, &texture);
@@ -349,7 +351,8 @@ int main(int argc, char** argv) {
host->compositor(),
frames));
} else {
- bench.reset(new WebGLBench(&page_background,
+ bench.reset(new WebGLBench(context_factory.get(),
+ &page_background,
host->compositor(),
frames));
}
« no previous file with comments | « content/browser/compositor/image_transport_factory.cc ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698