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

Side by Side Diff: command_buffer/service/cross/resource.h

Issue 360018: Removed command_buffer dependency on vectormath (indirectly via core/types.h)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 1 month 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 | « command_buffer/service/cross/gapi_decoder.h ('k') | gpu_plugin/gpu_plugin.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
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 19 matching lines...) Expand all
30 */ 30 */
31 31
32 32
33 // This file contains the definition for resource classes and the resource map. 33 // This file contains the definition for resource classes and the resource map.
34 34
35 #ifndef O3D_COMMAND_BUFFER_SERVICE_CROSS_RESOURCE_H_ 35 #ifndef O3D_COMMAND_BUFFER_SERVICE_CROSS_RESOURCE_H_
36 #define O3D_COMMAND_BUFFER_SERVICE_CROSS_RESOURCE_H_ 36 #define O3D_COMMAND_BUFFER_SERVICE_CROSS_RESOURCE_H_
37 37
38 #include <vector> 38 #include <vector>
39 #include "base/scoped_ptr.h" 39 #include "base/scoped_ptr.h"
40 #include "core/cross/types.h"
41 #include "command_buffer/common/cross/resource.h" 40 #include "command_buffer/common/cross/resource.h"
42 41
43 namespace o3d { 42 namespace o3d {
44 namespace command_buffer { 43 namespace command_buffer {
45 44
46 // Base class for resources, just providing a common Destroy function. 45 // Base class for resources, just providing a common Destroy function.
47 class Resource { 46 class Resource {
48 public: 47 public:
49 Resource() {} 48 Resource() {}
50 virtual ~Resource() {} 49 virtual ~Resource() {}
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // Destroys a resource. 251 // Destroys a resource.
253 bool Destroy(ResourceId id) { 252 bool Destroy(ResourceId id) {
254 return container_.Destroy(id); 253 return container_.Destroy(id);
255 } 254 }
256 // Destroy all resources. 255 // Destroy all resources.
257 void DestroyAllResources() { 256 void DestroyAllResources() {
258 return container_.DestroyAllResources(); 257 return container_.DestroyAllResources();
259 } 258 }
260 // Gets a resource by ID. 259 // Gets a resource by ID.
261 T *Get(ResourceId id) { 260 T *Get(ResourceId id) {
262 return down_cast<T*>(container_.Get(id)); 261 return static_cast<T*>(container_.Get(id));
263 } 262 }
264 private: 263 private:
265 ResourceMapBase container_; 264 ResourceMapBase container_;
266 }; 265 };
267 266
268 } // namespace command_buffer 267 } // namespace command_buffer
269 } // namespace o3d 268 } // namespace o3d
270 269
271 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_RESOURCE_H_ 270 #endif // O3D_COMMAND_BUFFER_SERVICE_CROSS_RESOURCE_H_
OLDNEW
« no previous file with comments | « command_buffer/service/cross/gapi_decoder.h ('k') | gpu_plugin/gpu_plugin.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698