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

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

Issue 251343002: Remove offscreen compositor contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-offscreencontext: include Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/surfaces/surfaces_pixeltest.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 3150 matching lines...) Expand 10 before | Expand all | Expand 10 after
3161 void InitializeGLAndCheck(ContextSharedData* shared_data, 3161 void InitializeGLAndCheck(ContextSharedData* shared_data,
3162 ResourceProvider* resource_provider, 3162 ResourceProvider* resource_provider,
3163 FakeOutputSurface* output_surface) { 3163 FakeOutputSurface* output_surface) {
3164 scoped_ptr<ResourceProviderContext> context_owned = 3164 scoped_ptr<ResourceProviderContext> context_owned =
3165 ResourceProviderContext::Create(shared_data); 3165 ResourceProviderContext::Create(shared_data);
3166 ResourceProviderContext* context = context_owned.get(); 3166 ResourceProviderContext* context = context_owned.get();
3167 3167
3168 scoped_refptr<TestContextProvider> context_provider = 3168 scoped_refptr<TestContextProvider> context_provider =
3169 TestContextProvider::Create( 3169 TestContextProvider::Create(
3170 context_owned.PassAs<TestWebGraphicsContext3D>()); 3170 context_owned.PassAs<TestWebGraphicsContext3D>());
3171 output_surface->InitializeAndSetContext3d(context_provider, NULL); 3171 output_surface->InitializeAndSetContext3d(context_provider);
3172 resource_provider->InitializeGL(); 3172 resource_provider->InitializeGL();
3173 3173
3174 CheckCreateResource(ResourceProvider::GLTexture, resource_provider, context); 3174 CheckCreateResource(ResourceProvider::GLTexture, resource_provider, context);
3175 } 3175 }
3176 3176
3177 TEST(ResourceProviderTest, BasicInitializeGLSoftware) { 3177 TEST(ResourceProviderTest, BasicInitializeGLSoftware) {
3178 scoped_ptr<ContextSharedData> shared_data = ContextSharedData::Create(); 3178 scoped_ptr<ContextSharedData> shared_data = ContextSharedData::Create();
3179 FakeOutputSurfaceClient client; 3179 FakeOutputSurfaceClient client;
3180 scoped_ptr<FakeOutputSurface> output_surface( 3180 scoped_ptr<FakeOutputSurface> output_surface(
3181 FakeOutputSurface::CreateDeferredGL( 3181 FakeOutputSurface::CreateDeferredGL(
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
3339 resource_provider->AllocateForTesting(id); 3339 resource_provider->AllocateForTesting(id);
3340 Mock::VerifyAndClearExpectations(context); 3340 Mock::VerifyAndClearExpectations(context);
3341 3341
3342 DCHECK_EQ(10u, context->PeekTextureId()); 3342 DCHECK_EQ(10u, context->PeekTextureId());
3343 resource_provider->DeleteResource(id); 3343 resource_provider->DeleteResource(id);
3344 } 3344 }
3345 } 3345 }
3346 3346
3347 } // namespace 3347 } // namespace
3348 } // namespace cc 3348 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/surfaces/surfaces_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698