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

Side by Side Diff: cc/trees/layer_tree_host_unittest.cc

Issue 1152473006: cc: Remove DrawQuad::IterateResoruces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 3094 matching lines...) Expand 10 before | Expand all | Expand 10 after
3105 Mock::VerifyAndClearExpectations(&mock_context_); 3105 Mock::VerifyAndClearExpectations(&mock_context_);
3106 ResourceProvider* resource_provider = host_impl->resource_provider(); 3106 ResourceProvider* resource_provider = host_impl->resource_provider();
3107 EXPECT_EQ(1u, resource_provider->num_resources()); 3107 EXPECT_EQ(1u, resource_provider->num_resources());
3108 CHECK_EQ(1u, frame->render_passes.size()); 3108 CHECK_EQ(1u, frame->render_passes.size());
3109 CHECK_LE(1u, frame->render_passes[0]->quad_list.size()); 3109 CHECK_LE(1u, frame->render_passes[0]->quad_list.size());
3110 const DrawQuad* quad = frame->render_passes[0]->quad_list.front(); 3110 const DrawQuad* quad = frame->render_passes[0]->quad_list.front();
3111 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material); 3111 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material);
3112 const IOSurfaceDrawQuad* io_surface_draw_quad = 3112 const IOSurfaceDrawQuad* io_surface_draw_quad =
3113 IOSurfaceDrawQuad::MaterialCast(quad); 3113 IOSurfaceDrawQuad::MaterialCast(quad);
3114 EXPECT_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size); 3114 EXPECT_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size);
3115 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id); 3115 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id());
3116 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB), 3116 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB),
3117 resource_provider->TargetForTesting( 3117 resource_provider->TargetForTesting(
3118 io_surface_draw_quad->io_surface_resource_id)); 3118 io_surface_draw_quad->io_surface_resource_id()));
3119 3119
3120 if (delegating_renderer()) { 3120 if (delegating_renderer()) {
3121 // The io surface layer's resource should be sent to the parent. 3121 // The io surface layer's resource should be sent to the parent.
3122 EXPECT_CALL(*mock_context_, produceTextureDirectCHROMIUM( 3122 EXPECT_CALL(*mock_context_, produceTextureDirectCHROMIUM(
3123 _, GL_TEXTURE_RECTANGLE_ARB, _)).Times(1); 3123 _, GL_TEXTURE_RECTANGLE_ARB, _)).Times(1);
3124 } else { 3124 } else {
3125 // The io surface layer's texture is drawn. 3125 // The io surface layer's texture is drawn.
3126 EXPECT_CALL(*mock_context_, activeTexture(GL_TEXTURE0)).Times(AtLeast(1)); 3126 EXPECT_CALL(*mock_context_, activeTexture(GL_TEXTURE0)).Times(AtLeast(1));
3127 EXPECT_CALL(*mock_context_, drawElements(GL_TRIANGLES, 6, _, _)) 3127 EXPECT_CALL(*mock_context_, drawElements(GL_TRIANGLES, 6, _, _))
3128 .Times(AtLeast(1)); 3128 .Times(AtLeast(1));
(...skipping 4151 matching lines...) Expand 10 before | Expand all | Expand 10 after
7280 void AfterTest() override {} 7280 void AfterTest() override {}
7281 7281
7282 scoped_refptr<FakePictureLayer> content_child_layer_; 7282 scoped_refptr<FakePictureLayer> content_child_layer_;
7283 FakeContentLayerClient client_; 7283 FakeContentLayerClient client_;
7284 }; 7284 };
7285 7285
7286 SINGLE_AND_MULTI_THREAD_TEST_F( 7286 SINGLE_AND_MULTI_THREAD_TEST_F(
7287 LayerTreeTestReflectionMaskLayerForSurfaceWithUnclippedChild); 7287 LayerTreeTestReflectionMaskLayerForSurfaceWithUnclippedChild);
7288 7288
7289 } // namespace cc 7289 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698