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

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

Issue 448303002: Use custom ListContainer to allocate DrawQuads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@perftest
Patch Set: change header files to try fix compile error Created 6 years, 2 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/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2543 2543
2544 virtual DrawResult PrepareToDrawOnThread( 2544 virtual DrawResult PrepareToDrawOnThread(
2545 LayerTreeHostImpl* host_impl, 2545 LayerTreeHostImpl* host_impl,
2546 LayerTreeHostImpl::FrameData* frame, 2546 LayerTreeHostImpl::FrameData* frame,
2547 DrawResult draw_result) OVERRIDE { 2547 DrawResult draw_result) OVERRIDE {
2548 Mock::VerifyAndClearExpectations(&mock_context_); 2548 Mock::VerifyAndClearExpectations(&mock_context_);
2549 ResourceProvider* resource_provider = host_impl->resource_provider(); 2549 ResourceProvider* resource_provider = host_impl->resource_provider();
2550 EXPECT_EQ(1u, resource_provider->num_resources()); 2550 EXPECT_EQ(1u, resource_provider->num_resources());
2551 CHECK_EQ(1u, frame->render_passes.size()); 2551 CHECK_EQ(1u, frame->render_passes.size());
2552 CHECK_LE(1u, frame->render_passes[0]->quad_list.size()); 2552 CHECK_LE(1u, frame->render_passes[0]->quad_list.size());
2553 const DrawQuad* quad = frame->render_passes[0]->quad_list[0]; 2553 const DrawQuad* quad = frame->render_passes[0]->quad_list.front();
2554 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material); 2554 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material);
2555 const IOSurfaceDrawQuad* io_surface_draw_quad = 2555 const IOSurfaceDrawQuad* io_surface_draw_quad =
2556 IOSurfaceDrawQuad::MaterialCast(quad); 2556 IOSurfaceDrawQuad::MaterialCast(quad);
2557 EXPECT_SIZE_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size); 2557 EXPECT_SIZE_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size);
2558 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id); 2558 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id);
2559 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB), 2559 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB),
2560 resource_provider->TargetForTesting( 2560 resource_provider->TargetForTesting(
2561 io_surface_draw_quad->io_surface_resource_id)); 2561 io_surface_draw_quad->io_surface_resource_id));
2562 2562
2563 EXPECT_CALL(*mock_context_, bindTexture(GL_TEXTURE_RECTANGLE_ARB, 1)) 2563 EXPECT_CALL(*mock_context_, bindTexture(GL_TEXTURE_RECTANGLE_ARB, 1))
(...skipping 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after
5106 int activation_count_; 5106 int activation_count_;
5107 5107
5108 FakeContentLayerClient client_; 5108 FakeContentLayerClient client_;
5109 scoped_refptr<FakePictureLayer> picture_layer_; 5109 scoped_refptr<FakePictureLayer> picture_layer_;
5110 }; 5110 };
5111 5111
5112 // TODO(vmpstr): Enable with single thread impl-side painting. 5112 // TODO(vmpstr): Enable with single thread impl-side painting.
5113 MULTI_THREAD_TEST_F(LayerTreeHostTestInvisibleDoesntActivate); 5113 MULTI_THREAD_TEST_F(LayerTreeHostTestInvisibleDoesntActivate);
5114 5114
5115 } // namespace cc 5115 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc ('k') | cc/trees/layer_tree_host_unittest_delegated.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698