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

Side by Side Diff: content/common/gpu/gpu_memory_manager_unittest.cc

Issue 10052018: Drop frontbuffers with ui-use-gpu-process, synchronized with browser, decoupled from backbuffer dro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing compile issue for content_unittests Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/gpu/gpu_command_buffer_stub.h" 5 #include "content/common/gpu/gpu_command_buffer_stub.h"
6 #include "content/common/gpu/gpu_memory_allocation.h" 6 #include "content/common/gpu/gpu_memory_allocation.h"
7 #include "content/common/gpu/gpu_memory_manager.h" 7 #include "content/common/gpu/gpu_memory_manager.h"
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 16 matching lines...) Expand all
27 return surface_state_.surface_id != 0; 27 return surface_state_.surface_id != 0;
28 } 28 }
29 virtual const SurfaceState& surface_state() const { 29 virtual const SurfaceState& surface_state() const {
30 return surface_state_; 30 return surface_state_;
31 } 31 }
32 32
33 virtual bool IsInSameContextShareGroup( 33 virtual bool IsInSameContextShareGroup(
34 const GpuCommandBufferStubBase& stub) const { 34 const GpuCommandBufferStubBase& stub) const {
35 return false; 35 return false;
36 } 36 }
37 virtual void SendMemoryAllocationToProxy(const GpuMemoryAllocation& alloc) {
38 }
39 virtual void SetMemoryAllocation(const GpuMemoryAllocation& alloc) { 37 virtual void SetMemoryAllocation(const GpuMemoryAllocation& alloc) {
40 allocation_ = alloc; 38 allocation_ = alloc;
41 } 39 }
42 }; 40 };
43 41
44 class FakeCommandBufferStubWithoutSurface : public GpuCommandBufferStubBase { 42 class FakeCommandBufferStubWithoutSurface : public GpuCommandBufferStubBase {
45 public: 43 public:
46 GpuMemoryAllocation allocation_; 44 GpuMemoryAllocation allocation_;
47 std::vector<GpuCommandBufferStubBase*> share_group_; 45 std::vector<GpuCommandBufferStubBase*> share_group_;
48 46
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 shfb != &suggest_have_frontbuffer_values[2]; ++shfb) { 475 shfb != &suggest_have_frontbuffer_values[2]; ++shfb) {
478 GpuMemoryAllocation allocation(*sz, *shbb, *shfb); 476 GpuMemoryAllocation allocation(*sz, *shbb, *shfb);
479 EXPECT_EQ(allocation, GpuMemoryAllocation(*sz, *shbb, *shfb)); 477 EXPECT_EQ(allocation, GpuMemoryAllocation(*sz, *shbb, *shfb));
480 EXPECT_NE(allocation, GpuMemoryAllocation(*sz+1, *shbb, *shfb)); 478 EXPECT_NE(allocation, GpuMemoryAllocation(*sz+1, *shbb, *shfb));
481 EXPECT_NE(allocation, GpuMemoryAllocation(*sz, !*shbb, *shfb)); 479 EXPECT_NE(allocation, GpuMemoryAllocation(*sz, !*shbb, *shfb));
482 EXPECT_NE(allocation, GpuMemoryAllocation(*sz, *shbb, !*shfb)); 480 EXPECT_NE(allocation, GpuMemoryAllocation(*sz, *shbb, !*shfb));
483 } 481 }
484 } 482 }
485 } 483 }
486 } 484 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698