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

Side by Side Diff: cc/resources/resource_provider_unittest.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/resources/resource_provider.cc ('k') | cc/resources/video_resource_updater.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/resources/resource_provider.h" 5 #include "cc/resources/resource_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 3398 matching lines...) Expand 10 before | Expand all | Expand 10 after
3409 } 3409 }
3410 Mock::VerifyAndClearExpectations(context); 3410 Mock::VerifyAndClearExpectations(context);
3411 3411
3412 dest_id = resource_provider->CreateResource( 3412 dest_id = resource_provider->CreateResource(
3413 size, GL_CLAMP_TO_EDGE, ResourceProvider::TextureHintImmutable, format); 3413 size, GL_CLAMP_TO_EDGE, ResourceProvider::TextureHintImmutable, format);
3414 3414
3415 EXPECT_CALL(*context, NextTextureId()) 3415 EXPECT_CALL(*context, NextTextureId())
3416 .WillOnce(Return(kDestTextureId)) 3416 .WillOnce(Return(kDestTextureId))
3417 .RetiresOnSaturation(); 3417 .RetiresOnSaturation();
3418 EXPECT_CALL(*context, bindTexture(GL_TEXTURE_2D, kDestTextureId)) 3418 EXPECT_CALL(*context, bindTexture(GL_TEXTURE_2D, kDestTextureId))
3419 .Times(2)
3420 .RetiresOnSaturation();
3421 EXPECT_CALL(*context, texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0, GL_RGBA,
3422 GL_UNSIGNED_BYTE, nullptr))
3419 .Times(1) 3423 .Times(1)
3420 .RetiresOnSaturation(); 3424 .RetiresOnSaturation();
3421 EXPECT_CALL(*context, NextTextureId()) 3425 EXPECT_CALL(*context, NextTextureId())
3422 .WillOnce(Return(kSourceTextureId)) 3426 .WillOnce(Return(kSourceTextureId))
3423 .RetiresOnSaturation(); 3427 .RetiresOnSaturation();
3424 EXPECT_CALL(*context, bindTexture(GL_TEXTURE_2D, kSourceTextureId)) 3428 EXPECT_CALL(*context, bindTexture(GL_TEXTURE_2D, kSourceTextureId))
3425 .Times(2) 3429 .Times(2)
3426 .RetiresOnSaturation(); 3430 .RetiresOnSaturation();
3427 EXPECT_CALL(*context, bindTexImage2DCHROMIUM(GL_TEXTURE_2D, kImageId)) 3431 EXPECT_CALL(*context, bindTexImage2DCHROMIUM(GL_TEXTURE_2D, kImageId))
3428 .Times(1) 3432 .Times(1)
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
3639 resource_provider->AllocateForTesting(id); 3643 resource_provider->AllocateForTesting(id);
3640 Mock::VerifyAndClearExpectations(context); 3644 Mock::VerifyAndClearExpectations(context);
3641 3645
3642 DCHECK_EQ(10u, context->PeekTextureId()); 3646 DCHECK_EQ(10u, context->PeekTextureId());
3643 resource_provider->DeleteResource(id); 3647 resource_provider->DeleteResource(id);
3644 } 3648 }
3645 } 3649 }
3646 3650
3647 } // namespace 3651 } // namespace
3648 } // namespace cc 3652 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/resources/video_resource_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698