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

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: Use helper function. 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 25 matching lines...) Expand all
36 gfx::GpuMemoryBufferHandle GetHandle() const override { 36 gfx::GpuMemoryBufferHandle GetHandle() const override {
37 return gfx::GpuMemoryBufferHandle(); 37 return gfx::GpuMemoryBufferHandle();
38 } 38 }
39 ClientBuffer AsClientBuffer() override { 39 ClientBuffer AsClientBuffer() override {
40 return reinterpret_cast<ClientBuffer>(this); 40 return reinterpret_cast<ClientBuffer>(this);
41 } 41 }
42 }; 42 };
43 43
44 class StubBrowserGpuMemoryBufferManager : public BrowserGpuMemoryBufferManager { 44 class StubBrowserGpuMemoryBufferManager : public BrowserGpuMemoryBufferManager {
45 public: 45 public:
46 StubBrowserGpuMemoryBufferManager() : BrowserGpuMemoryBufferManager(1) {} 46 StubBrowserGpuMemoryBufferManager() : BrowserGpuMemoryBufferManager(1, 1) {}
47 47
48 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout( 48 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout(
49 const gfx::Size& size, 49 const gfx::Size& size,
50 gfx::GpuMemoryBuffer::Format format, 50 gfx::GpuMemoryBuffer::Format format,
51 int32 surface_id) override { 51 int32 surface_id) override {
52 return make_scoped_ptr<gfx::GpuMemoryBuffer>(new StubGpuMemoryBufferImpl); 52 return make_scoped_ptr<gfx::GpuMemoryBuffer>(new StubGpuMemoryBufferImpl);
53 } 53 }
54 }; 54 };
55 55
56 class MockBufferQueue : public BufferQueue { 56 class MockBufferQueue : public BufferQueue {
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // All free buffers should be destroyed, the remaining buffers should all 546 // All free buffers should be destroyed, the remaining buffers should all
547 // be replaced but still valid. 547 // be replaced but still valid.
548 EXPECT_EQ(1U, in_flight_surfaces().size()); 548 EXPECT_EQ(1U, in_flight_surfaces().size());
549 EXPECT_EQ(0U, available_surfaces().size()); 549 EXPECT_EQ(0U, available_surfaces().size());
550 EXPECT_TRUE(displayed_frame().texture); 550 EXPECT_TRUE(displayed_frame().texture);
551 EXPECT_TRUE(current_frame().texture); 551 EXPECT_TRUE(current_frame().texture);
552 } 552 }
553 553
554 } // namespace 554 } // namespace
555 } // namespace content 555 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698