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

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

Issue 1406013007: cc: Remove GL_TEXTURE_2D hard-coding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set upstream right Created 5 years, 1 month 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/fake_delegated_renderer_layer_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2301 matching lines...) Expand 10 before | Expand all | Expand 10 after
2312 EXPECT_EQ(1u, resource_provider->num_resources()); 2312 EXPECT_EQ(1u, resource_provider->num_resources());
2313 CHECK_EQ(1u, frame->render_passes.size()); 2313 CHECK_EQ(1u, frame->render_passes.size());
2314 CHECK_LE(1u, frame->render_passes[0]->quad_list.size()); 2314 CHECK_LE(1u, frame->render_passes[0]->quad_list.size());
2315 const DrawQuad* quad = frame->render_passes[0]->quad_list.front(); 2315 const DrawQuad* quad = frame->render_passes[0]->quad_list.front();
2316 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material); 2316 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material);
2317 const IOSurfaceDrawQuad* io_surface_draw_quad = 2317 const IOSurfaceDrawQuad* io_surface_draw_quad =
2318 IOSurfaceDrawQuad::MaterialCast(quad); 2318 IOSurfaceDrawQuad::MaterialCast(quad);
2319 EXPECT_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size); 2319 EXPECT_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size);
2320 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id()); 2320 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id());
2321 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB), 2321 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB),
2322 resource_provider->TargetForTesting( 2322 resource_provider->GetResourceTextureTarget(
2323 io_surface_draw_quad->io_surface_resource_id())); 2323 io_surface_draw_quad->io_surface_resource_id()));
2324 2324
2325 if (delegating_renderer()) { 2325 if (delegating_renderer()) {
2326 // The io surface layer's resource should be sent to the parent. 2326 // The io surface layer's resource should be sent to the parent.
2327 EXPECT_CALL(*mock_context_, produceTextureDirectCHROMIUM( 2327 EXPECT_CALL(*mock_context_, produceTextureDirectCHROMIUM(
2328 _, GL_TEXTURE_RECTANGLE_ARB, _)).Times(1); 2328 _, GL_TEXTURE_RECTANGLE_ARB, _)).Times(1);
2329 } else { 2329 } else {
2330 // The io surface layer's texture is drawn. 2330 // The io surface layer's texture is drawn.
2331 EXPECT_CALL(*mock_context_, activeTexture(GL_TEXTURE0)).Times(AtLeast(1)); 2331 EXPECT_CALL(*mock_context_, activeTexture(GL_TEXTURE0)).Times(AtLeast(1));
2332 EXPECT_CALL(*mock_context_, drawElements(GL_TRIANGLES, 6, _, _)) 2332 EXPECT_CALL(*mock_context_, drawElements(GL_TRIANGLES, 6, _, _))
(...skipping 4068 matching lines...) Expand 10 before | Expand all | Expand 10 after
6401 EndTest(); 6401 EndTest();
6402 } 6402 }
6403 6403
6404 void AfterTest() override {} 6404 void AfterTest() override {}
6405 }; 6405 };
6406 6406
6407 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); 6407 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor);
6408 6408
6409 } // namespace 6409 } // namespace
6410 } // namespace cc 6410 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_delegated_renderer_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698