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

Unified Diff: cc/output/gl_renderer_unittest.cc

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 3 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 | « cc/output/gl_renderer.cc ('k') | cc/output/output_surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer_unittest.cc
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index 4befaf51e28e19eca6deacb42e8025f25c51fedb..c98652c28758b339104187bbe0071c703463b171 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -556,8 +556,8 @@ TEST_F(GLRendererTest, OpaqueBackground) {
ClearCountingContext* context = context_owned.get();
FakeOutputSurfaceClient output_surface_client;
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d(
- context_owned.PassAs<TestWebGraphicsContext3D>()));
+ scoped_ptr<OutputSurface> output_surface(
+ FakeOutputSurface::Create3d(context_owned.Pass()));
CHECK(output_surface->BindToClient(&output_surface_client));
scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
@@ -608,8 +608,8 @@ TEST_F(GLRendererTest, TransparentBackground) {
ClearCountingContext* context = context_owned.get();
FakeOutputSurfaceClient output_surface_client;
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d(
- context_owned.PassAs<TestWebGraphicsContext3D>()));
+ scoped_ptr<OutputSurface> output_surface(
+ FakeOutputSurface::Create3d(context_owned.Pass()));
CHECK(output_surface->BindToClient(&output_surface_client));
scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
@@ -653,8 +653,8 @@ TEST_F(GLRendererTest, OffscreenOutputSurface) {
ClearCountingContext* context = context_owned.get();
FakeOutputSurfaceClient output_surface_client;
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::CreateOffscreen(
- context_owned.PassAs<TestWebGraphicsContext3D>()));
+ scoped_ptr<OutputSurface> output_surface(
+ FakeOutputSurface::CreateOffscreen(context_owned.Pass()));
CHECK(output_surface->BindToClient(&output_surface_client));
scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
@@ -732,8 +732,8 @@ TEST_F(GLRendererTest, VisibilityChangeIsLastCall) {
new VisibilityChangeIsLastCallTrackingContext);
VisibilityChangeIsLastCallTrackingContext* context = context_owned.get();
- scoped_refptr<TestContextProvider> provider = TestContextProvider::Create(
- context_owned.PassAs<TestWebGraphicsContext3D>());
+ scoped_refptr<TestContextProvider> provider =
+ TestContextProvider::Create(context_owned.Pass());
provider->support()->SetSurfaceVisibleCallback(base::Bind(
&VisibilityChangeIsLastCallTrackingContext::set_last_call_was_visibility,
@@ -811,8 +811,8 @@ TEST_F(GLRendererTest, ActiveTextureState) {
TextureStateTrackingContext* context = context_owned.get();
FakeOutputSurfaceClient output_surface_client;
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d(
- context_owned.PassAs<TestWebGraphicsContext3D>()));
+ scoped_ptr<OutputSurface> output_surface(
+ FakeOutputSurface::Create3d(context_owned.Pass()));
CHECK(output_surface->BindToClient(&output_surface_client));
scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
@@ -902,8 +902,8 @@ TEST_F(GLRendererTest, ShouldClearRootRenderPass) {
NoClearRootRenderPassMockContext* mock_context = mock_context_owned.get();
FakeOutputSurfaceClient output_surface_client;
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d(
- mock_context_owned.PassAs<TestWebGraphicsContext3D>()));
+ scoped_ptr<OutputSurface> output_surface(
+ FakeOutputSurface::Create3d(mock_context_owned.Pass()));
CHECK(output_surface->BindToClient(&output_surface_client));
scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
@@ -1000,8 +1000,8 @@ TEST_F(GLRendererTest, ScissorTestWhenClearing) {
new ScissorTestOnClearCheckingContext);
FakeOutputSurfaceClient output_surface_client;
- scoped_ptr<OutputSurface> output_surface(FakeOutputSurface::Create3d(
- context_owned.PassAs<TestWebGraphicsContext3D>()));
+ scoped_ptr<OutputSurface> output_surface(
+ FakeOutputSurface::Create3d(context_owned.Pass()));
CHECK(output_surface->BindToClient(&output_surface_client));
scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
@@ -1098,8 +1098,7 @@ TEST_F(GLRendererTest, NoDiscardOnPartialUpdates) {
FakeOutputSurfaceClient output_surface_client;
scoped_ptr<NonReshapableOutputSurface> output_surface(
- new NonReshapableOutputSurface(
- context_owned.PassAs<TestWebGraphicsContext3D>()));
+ new NonReshapableOutputSurface(context_owned.Pass()));
CHECK(output_surface->BindToClient(&output_surface_client));
output_surface->set_fixed_size(gfx::Size(100, 100));
@@ -1290,8 +1289,8 @@ TEST_F(GLRendererTest, ScissorAndViewportWithinNonreshapableSurface) {
new FlippedScissorAndViewportContext);
FakeOutputSurfaceClient output_surface_client;
- scoped_ptr<OutputSurface> output_surface(new NonReshapableOutputSurface(
- context_owned.PassAs<TestWebGraphicsContext3D>()));
+ scoped_ptr<OutputSurface> output_surface(
+ new NonReshapableOutputSurface(context_owned.Pass()));
CHECK(output_surface->BindToClient(&output_surface_client));
scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/output_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698