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

Side by Side Diff: cc/test/layer_tree_pixel_test.cc

Issue 20185002: ContextProvider in OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: contextprovider: don't access Context3d() in OutputSurface contructors, it's not bound yet Created 7 years, 4 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/test/fake_output_surface.cc ('k') | cc/test/layer_tree_test.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/layer_tree_pixel_test.h" 5 #include "cc/test/layer_tree_pixel_test.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "cc/layers/solid_color_layer.h" 8 #include "cc/layers/solid_color_layer.h"
9 #include "cc/layers/texture_layer.h" 9 #include "cc/layers/texture_layer.h"
10 #include "cc/output/copy_output_request.h" 10 #include "cc/output/copy_output_request.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 output_surface = make_scoped_ptr( 45 output_surface = make_scoped_ptr(
46 new PixelTestOutputSurface( 46 new PixelTestOutputSurface(
47 software_output_device.PassAs<SoftwareOutputDevice>())); 47 software_output_device.PassAs<SoftwareOutputDevice>()));
48 break; 48 break;
49 } 49 }
50 50
51 case GL_WITH_DEFAULT: 51 case GL_WITH_DEFAULT:
52 case GL_WITH_BITMAP: { 52 case GL_WITH_BITMAP: {
53 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); 53 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL));
54 54
55 using WebKit::WebGraphicsContext3D; 55 using webkit::gpu::ContextProviderInProcess;
56 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; 56 output_surface = make_scoped_ptr(new PixelTestOutputSurface(
57 scoped_ptr<WebGraphicsContext3D> context( 57 ContextProviderInProcess::CreateOffscreen()));
58 WebGraphicsContext3DInProcessCommandBufferImpl::
59 CreateOffscreenContext(WebGraphicsContext3D::Attributes()));
60 output_surface.reset(new PixelTestOutputSurface(context.Pass()));
61 break; 58 break;
62 } 59 }
63 } 60 }
64 61
65 output_surface->set_viewport_offset(viewport_offset); 62 output_surface->set_viewport_offset(viewport_offset);
66 output_surface->set_surface_expansion_size(surface_expansion_size); 63 output_surface->set_surface_expansion_size(surface_expansion_size);
67 return output_surface.PassAs<OutputSurface>(); 64 return output_surface.PassAs<OutputSurface>();
68 } 65 }
69 66
70 scoped_refptr<cc::ContextProvider> 67 scoped_refptr<cc::ContextProvider>
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 return TextureMailbox( 367 return TextureMailbox(
371 mailbox, 368 mailbox,
372 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, 369 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox,
373 base::Unretained(this), 370 base::Unretained(this),
374 base::Passed(&context3d), 371 base::Passed(&context3d),
375 texture_id), 372 texture_id),
376 sync_point); 373 sync_point);
377 } 374 }
378 375
379 } // namespace cc 376 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698