| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // This file looks like a unit test, but it contains benchmarks and test | 5 // This file looks like a unit test, but it contains benchmarks and test |
| 6 // utilities intended for manual evaluation of the scalers in | 6 // utilities intended for manual evaluation of the scalers in |
| 7 // gl_helper*. These tests produce output in the form of files and printouts, | 7 // gl_helper*. These tests produce output in the form of files and printouts, |
| 8 // but cannot really "fail". There is no point in making these tests part | 8 // but cannot really "fail". There is no point in making these tests part |
| 9 // of any test automation run. | 9 // of any test automation run. |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 attributes.sample_buffers = 1; | 60 attributes.sample_buffers = 1; |
| 61 attributes.bind_generates_resource = false; | 61 attributes.bind_generates_resource = false; |
| 62 | 62 |
| 63 context_.reset(gpu::GLInProcessContext::Create( | 63 context_.reset(gpu::GLInProcessContext::Create( |
| 64 nullptr, /* service */ | 64 nullptr, /* service */ |
| 65 nullptr, /* surface */ | 65 nullptr, /* surface */ |
| 66 true, /* offscreen */ | 66 true, /* offscreen */ |
| 67 gfx::kNullAcceleratedWidget, /* window */ | 67 gfx::kNullAcceleratedWidget, /* window */ |
| 68 gfx::Size(1, 1), /* size */ | 68 gfx::Size(1, 1), /* size */ |
| 69 nullptr, /* share_context */ | 69 nullptr, /* share_context */ |
| 70 true, /* use_global_share_group */ | |
| 71 attributes, gfx::PreferDiscreteGpu, | 70 attributes, gfx::PreferDiscreteGpu, |
| 72 ::gpu::GLInProcessContextSharedMemoryLimits(), | 71 ::gpu::GLInProcessContextSharedMemoryLimits(), |
| 73 nullptr, /* gpu_memory_buffer_manager */ | 72 nullptr, /* gpu_memory_buffer_manager */ |
| 74 nullptr /* image_factory */)); | 73 nullptr /* image_factory */)); |
| 75 gl_ = context_->GetImplementation(); | 74 gl_ = context_->GetImplementation(); |
| 76 gpu::ContextSupport* support = context_->GetImplementation(); | 75 gpu::ContextSupport* support = context_->GetImplementation(); |
| 77 | 76 |
| 78 helper_.reset(new content::GLHelper(gl_, support)); | 77 helper_.reset(new content::GLHelper(gl_, support)); |
| 79 helper_scaling_.reset(new content::GLHelperScaling(gl_, helper_.get())); | 78 helper_scaling_.reset(new content::GLHelperScaling(gl_, helper_.get())); |
| 80 } | 79 } |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 kQualityNames[q], percents[p]); | 238 kQualityNames[q], percents[p]); |
| 240 VLOG(0) << "Writing " << filename; | 239 VLOG(0) << "Writing " << filename; |
| 241 SaveToFile(&output_pixels, base::FilePath::FromUTF8Unsafe(filename)); | 240 SaveToFile(&output_pixels, base::FilePath::FromUTF8Unsafe(filename)); |
| 242 } | 241 } |
| 243 } | 242 } |
| 244 gl_->DeleteTextures(1, &src_texture); | 243 gl_->DeleteTextures(1, &src_texture); |
| 245 gl_->DeleteFramebuffers(1, &framebuffer); | 244 gl_->DeleteFramebuffers(1, &framebuffer); |
| 246 } | 245 } |
| 247 | 246 |
| 248 } // namespace | 247 } // namespace |
| OLD | NEW |