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

Side by Side Diff: gpu/command_buffer/service/resource_test.cc

Issue 465040: Added CommandBufferClient, CommandBufferStub and some IPC messages.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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
« no previous file with comments | « gpu/command_buffer/service/resource.cc ('k') | gpu/command_buffer/service/x_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 18 matching lines...) Expand all
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 32
33 // Tests for the ResourceMap. 33 // Tests for the ResourceMap.
34 34
35 #include "gpu/command_buffer/service/precompile.h" 35 #include "gpu/command_buffer/service/precompile.h"
36 #include "gpu/command_buffer/service/resource.h" 36 #include "gpu/command_buffer/service/resource.h"
37 #include "testing/gtest/include/gtest/gtest.h" 37 #include "testing/gtest/include/gtest/gtest.h"
38 38
39 namespace command_buffer { 39 namespace gpu {
40 40
41 // Mock resource implementation that checks for leaks. 41 // Mock resource implementation that checks for leaks.
42 class ResourceMock : public Resource { 42 class ResourceMock : public Resource {
43 public: 43 public:
44 ResourceMock() : Resource() { 44 ResourceMock() : Resource() {
45 ++instance_count_; 45 ++instance_count_;
46 } 46 }
47 virtual ~ResourceMock() { 47 virtual ~ResourceMock() {
48 --instance_count_; 48 --instance_count_;
49 } 49 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 map()->Assign(2, resource); 117 map()->Assign(2, resource);
118 resource = new ResourceMock(); 118 resource = new ResourceMock();
119 map()->Assign(3, resource); 119 map()->Assign(3, resource);
120 map()->DestroyAllResources(); 120 map()->DestroyAllResources();
121 EXPECT_EQ(NULL, map()->Get(1)); 121 EXPECT_EQ(NULL, map()->Get(1));
122 EXPECT_EQ(NULL, map()->Get(2)); 122 EXPECT_EQ(NULL, map()->Get(2));
123 EXPECT_EQ(NULL, map()->Get(3)); 123 EXPECT_EQ(NULL, map()->Get(3));
124 CheckLeaks(); 124 CheckLeaks();
125 } 125 }
126 126
127 } // namespace command_buffer 127 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/resource.cc ('k') | gpu/command_buffer/service/x_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698