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

Side by Side Diff: content/browser/compositor/buffer_queue_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <set> 5 #include <set>
6 6
7 #include "cc/test/test_context_provider.h" 7 #include "cc/test/test_context_provider.h"
8 #include "cc/test/test_web_graphics_context_3d.h" 8 #include "cc/test/test_web_graphics_context_3d.h"
9 #include "content/browser/compositor/buffer_queue.h" 9 #include "content/browser/compositor/buffer_queue.h"
10 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s urface.h" 10 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s urface.h"
(...skipping 27 matching lines...) Expand all
38 gfx::GpuMemoryBufferHandle GetHandle() const override { 38 gfx::GpuMemoryBufferHandle GetHandle() const override {
39 return gfx::GpuMemoryBufferHandle(); 39 return gfx::GpuMemoryBufferHandle();
40 } 40 }
41 ClientBuffer AsClientBuffer() override { 41 ClientBuffer AsClientBuffer() override {
42 return reinterpret_cast<ClientBuffer>(this); 42 return reinterpret_cast<ClientBuffer>(this);
43 } 43 }
44 }; 44 };
45 45
46 class StubBrowserGpuMemoryBufferManager : public BrowserGpuMemoryBufferManager { 46 class StubBrowserGpuMemoryBufferManager : public BrowserGpuMemoryBufferManager {
47 public: 47 public:
48 StubBrowserGpuMemoryBufferManager() : BrowserGpuMemoryBufferManager(1) {} 48 StubBrowserGpuMemoryBufferManager() : BrowserGpuMemoryBufferManager(1, 1) {}
49 49
50 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout( 50 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout(
51 const gfx::Size& size, 51 const gfx::Size& size,
52 gfx::BufferFormat format, 52 gfx::BufferFormat format,
53 int32 surface_id) override { 53 int32 surface_id) override {
54 return make_scoped_ptr<gfx::GpuMemoryBuffer>(new StubGpuMemoryBufferImpl); 54 return make_scoped_ptr<gfx::GpuMemoryBuffer>(new StubGpuMemoryBufferImpl);
55 } 55 }
56 }; 56 };
57 57
58 class MockBufferQueue : public BufferQueue { 58 class MockBufferQueue : public BufferQueue {
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 // All free buffers should be destroyed, the remaining buffers should all 548 // All free buffers should be destroyed, the remaining buffers should all
549 // be replaced but still valid. 549 // be replaced but still valid.
550 EXPECT_EQ(1U, in_flight_surfaces().size()); 550 EXPECT_EQ(1U, in_flight_surfaces().size());
551 EXPECT_EQ(0U, available_surfaces().size()); 551 EXPECT_EQ(0U, available_surfaces().size());
552 EXPECT_TRUE(displayed_frame().texture); 552 EXPECT_TRUE(displayed_frame().texture);
553 EXPECT_TRUE(current_frame().texture); 553 EXPECT_TRUE(current_frame().texture);
554 } 554 }
555 555
556 } // namespace 556 } // namespace
557 } // namespace content 557 } // namespace content
OLDNEW
« no previous file with comments | « components/view_manager/gles2/command_buffer_driver.cc ('k') | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698