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

Side by Side Diff: content/renderer/render_thread_impl_browsertest.cc

Issue 2526683002: gpu: Rename AllocateGpuMemoryBuffer to CreateGpuMemoryBuffer. (Closed)
Patch Set: . Created 4 years 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
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 "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 DISALLOW_COPY_AND_ASSIGN(RenderThreadImplGpuMemoryBufferBrowserTest); 330 DISALLOW_COPY_AND_ASSIGN(RenderThreadImplGpuMemoryBufferBrowserTest);
331 }; 331 };
332 332
333 // https://crbug.com/652531 333 // https://crbug.com/652531
334 IN_PROC_BROWSER_TEST_P(RenderThreadImplGpuMemoryBufferBrowserTest, 334 IN_PROC_BROWSER_TEST_P(RenderThreadImplGpuMemoryBufferBrowserTest,
335 DISABLED_Map) { 335 DISABLED_Map) {
336 gfx::BufferFormat format = ::testing::get<1>(GetParam()); 336 gfx::BufferFormat format = ::testing::get<1>(GetParam());
337 gfx::Size buffer_size(4, 4); 337 gfx::Size buffer_size(4, 4);
338 338
339 std::unique_ptr<gfx::GpuMemoryBuffer> buffer = 339 std::unique_ptr<gfx::GpuMemoryBuffer> buffer =
340 memory_buffer_manager()->AllocateGpuMemoryBuffer( 340 memory_buffer_manager()->CreateGpuMemoryBuffer(
341 buffer_size, format, gfx::BufferUsage::GPU_READ_CPU_READ_WRITE, 341 buffer_size, format, gfx::BufferUsage::GPU_READ_CPU_READ_WRITE,
342 gpu::kNullSurfaceHandle); 342 gpu::kNullSurfaceHandle);
343 ASSERT_TRUE(buffer); 343 ASSERT_TRUE(buffer);
344 EXPECT_EQ(format, buffer->GetFormat()); 344 EXPECT_EQ(format, buffer->GetFormat());
345 345
346 // Map buffer planes. 346 // Map buffer planes.
347 ASSERT_TRUE(buffer->Map()); 347 ASSERT_TRUE(buffer->Map());
348 348
349 // Write to buffer and check result. 349 // Write to buffer and check result.
350 size_t num_planes = gfx::NumberOfPlanesForBufferFormat(format); 350 size_t num_planes = gfx::NumberOfPlanesForBufferFormat(format);
(...skipping 30 matching lines...) Expand all
381 // These formats are guaranteed to work on all platforms. 381 // These formats are guaranteed to work on all platforms.
382 ::testing::Values(gfx::BufferFormat::R_8, 382 ::testing::Values(gfx::BufferFormat::R_8,
383 gfx::BufferFormat::BGR_565, 383 gfx::BufferFormat::BGR_565,
384 gfx::BufferFormat::RGBA_4444, 384 gfx::BufferFormat::RGBA_4444,
385 gfx::BufferFormat::RGBA_8888, 385 gfx::BufferFormat::RGBA_8888,
386 gfx::BufferFormat::BGRA_8888, 386 gfx::BufferFormat::BGRA_8888,
387 gfx::BufferFormat::YVU_420))); 387 gfx::BufferFormat::YVU_420)));
388 388
389 } // namespace 389 } // namespace
390 } // namespace content 390 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698