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

Side by Side Diff: content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc

Issue 1256613002: Add tracing for GL texture objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_process_id
Patch Set: Key texture manager memory dump provider registration off of memory_tracker_ Created 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // Unit test for VideoCaptureBufferPool. 5 // Unit test for VideoCaptureBufferPool.
6 6
7 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h" 7 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 uint8* const data_; 82 uint8* const data_;
83 bool mapped_; 83 bool mapped_;
84 }; 84 };
85 85
86 #if !defined(OS_ANDROID) 86 #if !defined(OS_ANDROID)
87 // The next two classes are needed to replicate the GpuMemoryBuffer allocation 87 // The next two classes are needed to replicate the GpuMemoryBuffer allocation
88 // on Browser side. 88 // on Browser side.
89 class StubBrowserGpuMemoryBufferManager 89 class StubBrowserGpuMemoryBufferManager
90 : public BrowserGpuMemoryBufferManager { 90 : public BrowserGpuMemoryBufferManager {
91 public: 91 public:
92 StubBrowserGpuMemoryBufferManager() : BrowserGpuMemoryBufferManager(1) {} 92 StubBrowserGpuMemoryBufferManager() : BrowserGpuMemoryBufferManager(1, 1) {}
93 93
94 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 94 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
95 const gfx::Size& size, 95 const gfx::Size& size,
96 gfx::BufferFormat format, 96 gfx::BufferFormat format,
97 gfx::BufferUsage usage) override { 97 gfx::BufferUsage usage) override {
98 return make_scoped_ptr(new MockGpuMemoryBuffer(size)); 98 return make_scoped_ptr(new MockGpuMemoryBuffer(size));
99 } 99 }
100 }; 100 };
101 class MockBufferQueue : public BufferQueue { 101 class MockBufferQueue : public BufferQueue {
102 public: 102 public:
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 if (buffer4->data() != nullptr) 356 if (buffer4->data() != nullptr)
357 memset(buffer4->data(), 0x77, buffer4->size()); 357 memset(buffer4->data(), 0x77, buffer4->size());
358 buffer4.reset(); 358 buffer4.reset();
359 } 359 }
360 360
361 INSTANTIATE_TEST_CASE_P(, 361 INSTANTIATE_TEST_CASE_P(,
362 VideoCaptureBufferPoolTest, 362 VideoCaptureBufferPoolTest,
363 testing::ValuesIn(kCapturePixelFormatAndStorages)); 363 testing::ValuesIn(kCapturePixelFormatAndStorages));
364 364
365 } // namespace content 365 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698