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

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

Issue 670183003: Update from chromium 62675d9fb31fb8cedc40f68e78e8445a74f362e7 (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/test/layer_tree_pixel_test.h ('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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "cc/base/switches.h" 9 #include "cc/base/switches.h"
10 #include "cc/layers/solid_color_layer.h" 10 #include "cc/layers/solid_color_layer.h"
(...skipping 10 matching lines...) Expand all
21 #include "cc/trees/layer_tree_impl.h" 21 #include "cc/trees/layer_tree_impl.h"
22 #include "gpu/command_buffer/client/gl_in_process_context.h" 22 #include "gpu/command_buffer/client/gl_in_process_context.h"
23 #include "gpu/command_buffer/client/gles2_implementation.h" 23 #include "gpu/command_buffer/client/gles2_implementation.h"
24 24
25 using gpu::gles2::GLES2Interface; 25 using gpu::gles2::GLES2Interface;
26 26
27 namespace cc { 27 namespace cc {
28 28
29 LayerTreePixelTest::LayerTreePixelTest() 29 LayerTreePixelTest::LayerTreePixelTest()
30 : pixel_comparator_(new ExactPixelComparator(true)), 30 : pixel_comparator_(new ExactPixelComparator(true)),
31 test_type_(GL_WITH_DEFAULT), 31 test_type_(PIXEL_TEST_GL),
32 pending_texture_mailbox_callbacks_(0), 32 pending_texture_mailbox_callbacks_(0),
33 impl_side_painting_(true) {} 33 impl_side_painting_(true) {
34 }
34 35
35 LayerTreePixelTest::~LayerTreePixelTest() {} 36 LayerTreePixelTest::~LayerTreePixelTest() {}
36 37
37 scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface( 38 scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface(
38 bool fallback) { 39 bool fallback) {
39 gfx::Size surface_expansion_size(40, 60); 40 gfx::Size surface_expansion_size(40, 60);
40 scoped_ptr<PixelTestOutputSurface> output_surface; 41 scoped_ptr<PixelTestOutputSurface> output_surface;
41 42
42 switch (test_type_) { 43 switch (test_type_) {
43 case SOFTWARE_WITH_DEFAULT: 44 case PIXEL_TEST_SOFTWARE: {
44 case SOFTWARE_WITH_BITMAP: {
45 scoped_ptr<PixelTestSoftwareOutputDevice> software_output_device( 45 scoped_ptr<PixelTestSoftwareOutputDevice> software_output_device(
46 new PixelTestSoftwareOutputDevice); 46 new PixelTestSoftwareOutputDevice);
47 software_output_device->set_surface_expansion_size( 47 software_output_device->set_surface_expansion_size(
48 surface_expansion_size); 48 surface_expansion_size);
49 output_surface = make_scoped_ptr( 49 output_surface = make_scoped_ptr(
50 new PixelTestOutputSurface(software_output_device.Pass())); 50 new PixelTestOutputSurface(software_output_device.Pass()));
51 break; 51 break;
52 } 52 }
53 53 case PIXEL_TEST_GL: {
54 case GL_WITH_DEFAULT:
55 case GL_WITH_BITMAP: {
56 output_surface = make_scoped_ptr( 54 output_surface = make_scoped_ptr(
57 new PixelTestOutputSurface(new TestInProcessContextProvider)); 55 new PixelTestOutputSurface(new TestInProcessContextProvider));
58 break; 56 break;
59 } 57 }
60 } 58 }
61 59
62 output_surface->set_surface_expansion_size(surface_expansion_size); 60 output_surface->set_surface_expansion_size(surface_expansion_size);
63 return output_surface.Pass(); 61 return output_surface.Pass();
64 } 62 }
65 63
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 358
361 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); 359 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point);
362 *release_callback = SingleReleaseCallback::Create( 360 *release_callback = SingleReleaseCallback::Create(
363 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, 361 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox,
364 base::Unretained(this), 362 base::Unretained(this),
365 base::Passed(&context), 363 base::Passed(&context),
366 texture_id)); 364 texture_id));
367 } 365 }
368 366
369 } // namespace cc 367 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_pixel_test.h ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698