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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/resources/tile.h » ('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 3500 matching lines...) Expand 10 before | Expand all | Expand 10 after
3511 3511
3512 void InitializeGLAndCheck(ContextSharedData* shared_data, 3512 void InitializeGLAndCheck(ContextSharedData* shared_data,
3513 ResourceProvider* resource_provider, 3513 ResourceProvider* resource_provider,
3514 FakeOutputSurface* output_surface) { 3514 FakeOutputSurface* output_surface) {
3515 scoped_ptr<ResourceProviderContext> context_owned = 3515 scoped_ptr<ResourceProviderContext> context_owned =
3516 ResourceProviderContext::Create(shared_data); 3516 ResourceProviderContext::Create(shared_data);
3517 ResourceProviderContext* context = context_owned.get(); 3517 ResourceProviderContext* context = context_owned.get();
3518 3518
3519 scoped_refptr<TestContextProvider> context_provider = 3519 scoped_refptr<TestContextProvider> context_provider =
3520 TestContextProvider::Create(context_owned.Pass()); 3520 TestContextProvider::Create(context_owned.Pass());
3521 output_surface->InitializeAndSetContext3d(context_provider); 3521 output_surface->InitializeAndSetContext3d(context_provider, nullptr);
3522 resource_provider->InitializeGL(); 3522 resource_provider->InitializeGL();
3523 3523
3524 CheckCreateResource(ResourceProvider::GLTexture, resource_provider, context); 3524 CheckCreateResource(ResourceProvider::GLTexture, resource_provider, context);
3525 } 3525 }
3526 3526
3527 TEST(ResourceProviderTest, BasicInitializeGLSoftware) { 3527 TEST(ResourceProviderTest, BasicInitializeGLSoftware) {
3528 scoped_ptr<ContextSharedData> shared_data = ContextSharedData::Create(); 3528 scoped_ptr<ContextSharedData> shared_data = ContextSharedData::Create();
3529 bool delegated_rendering = false; 3529 bool delegated_rendering = false;
3530 scoped_ptr<FakeOutputSurface> output_surface( 3530 scoped_ptr<FakeOutputSurface> output_surface(
3531 FakeOutputSurface::CreateDeferredGL( 3531 FakeOutputSurface::CreateDeferredGL(
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
3705 resource_provider->AllocateForTesting(id); 3705 resource_provider->AllocateForTesting(id);
3706 Mock::VerifyAndClearExpectations(context); 3706 Mock::VerifyAndClearExpectations(context);
3707 3707
3708 DCHECK_EQ(10u, context->PeekTextureId()); 3708 DCHECK_EQ(10u, context->PeekTextureId());
3709 resource_provider->DeleteResource(id); 3709 resource_provider->DeleteResource(id);
3710 } 3710 }
3711 } 3711 }
3712 3712
3713 } // namespace 3713 } // namespace
3714 } // namespace cc 3714 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/resources/tile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698