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

Side by Side Diff: content/browser/aura/software_browser_compositor_output_surface_unittest.cc

Issue 94963003: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Improve Windows initialization and renderBufferMultisample explanation Created 7 years 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 unified diff | Download patch
« no previous file with comments | « cc/test/pixel_test.cc ('k') | content/browser/aura/software_output_device_ozone_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "cc/output/compositor_frame.h" 6 #include "cc/output/compositor_frame.h"
7 #include "content/browser/aura/browser_compositor_output_surface_proxy.h" 7 #include "content/browser/aura/browser_compositor_output_surface_proxy.h"
8 #include "content/browser/aura/software_browser_compositor_output_surface.h" 8 #include "content/browser/aura/software_browser_compositor_output_surface.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/compositor/test/context_factories_for_test.h" 10 #include "ui/compositor/test/context_factories_for_test.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 scoped_ptr<ui::Compositor> compositor_; 73 scoped_ptr<ui::Compositor> compositor_;
74 74
75 IDMap<content::BrowserCompositorOutputSurface> surface_map_; 75 IDMap<content::BrowserCompositorOutputSurface> surface_map_;
76 scoped_refptr<content::BrowserCompositorOutputSurfaceProxy> surface_proxy_; 76 scoped_refptr<content::BrowserCompositorOutputSurfaceProxy> surface_proxy_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurfaceTest); 78 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurfaceTest);
79 }; 79 };
80 80
81 SoftwareBrowserCompositorOutputSurfaceTest:: 81 SoftwareBrowserCompositorOutputSurfaceTest::
82 SoftwareBrowserCompositorOutputSurfaceTest() { 82 SoftwareBrowserCompositorOutputSurfaceTest() {
83 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); 83 CHECK(gfx::InitializeStaticGLBindings(gfx::kGLImplementationOSMesaGL));
84 message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); 84 message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI));
85 } 85 }
86 86
87 SoftwareBrowserCompositorOutputSurfaceTest:: 87 SoftwareBrowserCompositorOutputSurfaceTest::
88 ~SoftwareBrowserCompositorOutputSurfaceTest() {} 88 ~SoftwareBrowserCompositorOutputSurfaceTest() {}
89 89
90 void SoftwareBrowserCompositorOutputSurfaceTest::SetUp() { 90 void SoftwareBrowserCompositorOutputSurfaceTest::SetUp() {
91 ui::InitializeContextFactoryForTests(false); 91 ui::InitializeContextFactoryForTests(false);
92 ui::Compositor::Initialize(); 92 ui::Compositor::Initialize();
93 93
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 FakeVSyncProvider* vsync_provider = static_cast<FakeVSyncProvider*>( 139 FakeVSyncProvider* vsync_provider = static_cast<FakeVSyncProvider*>(
140 output_surface_->software_device()->GetVSyncProvider()); 140 output_surface_->software_device()->GetVSyncProvider());
141 EXPECT_EQ(0, vsync_provider->call_count()); 141 EXPECT_EQ(0, vsync_provider->call_count());
142 142
143 cc::CompositorFrame frame; 143 cc::CompositorFrame frame;
144 output_surface_->SwapBuffers(&frame); 144 output_surface_->SwapBuffers(&frame);
145 145
146 EXPECT_EQ(1, vsync_provider->call_count()); 146 EXPECT_EQ(1, vsync_provider->call_count());
147 } 147 }
OLDNEW
« no previous file with comments | « cc/test/pixel_test.cc ('k') | content/browser/aura/software_output_device_ozone_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698