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

Side by Side Diff: content/browser/compositor/buffer_queue_unittest.cc

Issue 1280513002: Add GenericSharedMemoryId and use w/ GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trackpools
Patch Set: remove "tracing" from name 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 16 matching lines...) Expand all
27 StubGpuMemoryBufferImpl() {} 27 StubGpuMemoryBufferImpl() {}
28 28
29 // Overridden from gfx::GpuMemoryBuffer: 29 // Overridden from gfx::GpuMemoryBuffer:
30 bool Map(void** data) override { return false; } 30 bool Map(void** data) override { return false; }
31 void Unmap() override {} 31 void Unmap() override {}
32 bool IsMapped() const override { return false; } 32 bool IsMapped() const override { return false; }
33 gfx::BufferFormat GetFormat() const override { 33 gfx::BufferFormat GetFormat() const override {
34 return gfx::BufferFormat::RGBX_8888; 34 return gfx::BufferFormat::RGBX_8888;
35 } 35 }
36 void GetStride(int* stride) const override {} 36 void GetStride(int* stride) const override {}
37 gfx::GpuMemoryBufferId GetId() const override { return 0; } 37 gfx::GpuMemoryBufferId GetId() const override {
38 return gfx::GpuMemoryBufferId(0);
39 }
38 gfx::GpuMemoryBufferHandle GetHandle() const override { 40 gfx::GpuMemoryBufferHandle GetHandle() const override {
39 return gfx::GpuMemoryBufferHandle(); 41 return gfx::GpuMemoryBufferHandle();
40 } 42 }
41 ClientBuffer AsClientBuffer() override { 43 ClientBuffer AsClientBuffer() override {
42 return reinterpret_cast<ClientBuffer>(this); 44 return reinterpret_cast<ClientBuffer>(this);
43 } 45 }
44 }; 46 };
45 47
46 class StubBrowserGpuMemoryBufferManager : public BrowserGpuMemoryBufferManager { 48 class StubBrowserGpuMemoryBufferManager : public BrowserGpuMemoryBufferManager {
47 public: 49 public:
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 // All free buffers should be destroyed, the remaining buffers should all 550 // All free buffers should be destroyed, the remaining buffers should all
549 // be replaced but still valid. 551 // be replaced but still valid.
550 EXPECT_EQ(1U, in_flight_surfaces().size()); 552 EXPECT_EQ(1U, in_flight_surfaces().size());
551 EXPECT_EQ(0U, available_surfaces().size()); 553 EXPECT_EQ(0U, available_surfaces().size());
552 EXPECT_TRUE(displayed_frame().texture); 554 EXPECT_TRUE(displayed_frame().texture);
553 EXPECT_TRUE(current_frame().texture); 555 EXPECT_TRUE(current_frame().texture);
554 } 556 }
555 557
556 } // namespace 558 } // namespace
557 } // namespace content 559 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_io_surface_manager_mac.h ('k') | content/browser/gpu/browser_gpu_memory_buffer_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698