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

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: mkwst review 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 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after
3107 Mock::VerifyAndClearExpectations(&mock_context_); 3107 Mock::VerifyAndClearExpectations(&mock_context_);
3108 ResourceProvider* resource_provider = host_impl->resource_provider(); 3108 ResourceProvider* resource_provider = host_impl->resource_provider();
3109 EXPECT_EQ(1u, resource_provider->num_resources()); 3109 EXPECT_EQ(1u, resource_provider->num_resources());
3110 CHECK_EQ(1u, frame->render_passes.size()); 3110 CHECK_EQ(1u, frame->render_passes.size());
3111 CHECK_LE(1u, frame->render_passes[0]->quad_list.size()); 3111 CHECK_LE(1u, frame->render_passes[0]->quad_list.size());
3112 const DrawQuad* quad = frame->render_passes[0]->quad_list.front(); 3112 const DrawQuad* quad = frame->render_passes[0]->quad_list.front();
3113 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material); 3113 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material);
3114 const IOSurfaceDrawQuad* io_surface_draw_quad = 3114 const IOSurfaceDrawQuad* io_surface_draw_quad =
3115 IOSurfaceDrawQuad::MaterialCast(quad); 3115 IOSurfaceDrawQuad::MaterialCast(quad);
3116 EXPECT_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size); 3116 EXPECT_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size);
3117 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id); 3117 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id());
3118 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB), 3118 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB),
3119 resource_provider->TargetForTesting( 3119 resource_provider->TargetForTesting(
3120 io_surface_draw_quad->io_surface_resource_id)); 3120 io_surface_draw_quad->io_surface_resource_id()));
3121 3121
3122 if (delegating_renderer()) { 3122 if (delegating_renderer()) {
3123 // The io surface layer's resource should be sent to the parent. 3123 // The io surface layer's resource should be sent to the parent.
3124 EXPECT_CALL(*mock_context_, produceTextureDirectCHROMIUM( 3124 EXPECT_CALL(*mock_context_, produceTextureDirectCHROMIUM(
3125 _, GL_TEXTURE_RECTANGLE_ARB, _)).Times(1); 3125 _, GL_TEXTURE_RECTANGLE_ARB, _)).Times(1);
3126 } else { 3126 } else {
3127 // The io surface layer's texture is drawn. 3127 // The io surface layer's texture is drawn.
3128 EXPECT_CALL(*mock_context_, activeTexture(GL_TEXTURE0)).Times(AtLeast(1)); 3128 EXPECT_CALL(*mock_context_, activeTexture(GL_TEXTURE0)).Times(AtLeast(1));
3129 EXPECT_CALL(*mock_context_, drawElements(GL_TRIANGLES, 6, _, _)) 3129 EXPECT_CALL(*mock_context_, drawElements(GL_TRIANGLES, 6, _, _))
3130 .Times(AtLeast(1)); 3130 .Times(AtLeast(1));
(...skipping 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after
7273 void AfterTest() override {} 7273 void AfterTest() override {}
7274 7274
7275 scoped_refptr<FakePictureLayer> content_child_layer_; 7275 scoped_refptr<FakePictureLayer> content_child_layer_;
7276 FakeContentLayerClient client_; 7276 FakeContentLayerClient client_;
7277 }; 7277 };
7278 7278
7279 SINGLE_AND_MULTI_THREAD_TEST_F( 7279 SINGLE_AND_MULTI_THREAD_TEST_F(
7280 LayerTreeTestReflectionMaskLayerForSurfaceWithUnclippedChild); 7280 LayerTreeTestReflectionMaskLayerForSurfaceWithUnclippedChild);
7281 7281
7282 } // namespace cc 7282 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698