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

Side by Side Diff: command_buffer/service/win/d3d9/geometry_d3d9.cc

Issue 332036: move all O3D specific command buffer stuff to command_buffer::o3d... (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
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 23 matching lines...) Expand all
34 // VertexBuffer, IndexBuffer and VertexStruct resources. 34 // VertexBuffer, IndexBuffer and VertexStruct resources.
35 // This file also contains the related GAPID3D9 function implementations. 35 // This file also contains the related GAPID3D9 function implementations.
36 36
37 #include <algorithm> 37 #include <algorithm>
38 #include "command_buffer/service/win/d3d9/d3d9_utils.h" 38 #include "command_buffer/service/win/d3d9/d3d9_utils.h"
39 #include "command_buffer/service/win/d3d9/geometry_d3d9.h" 39 #include "command_buffer/service/win/d3d9/geometry_d3d9.h"
40 #include "command_buffer/service/win/d3d9/gapi_d3d9.h" 40 #include "command_buffer/service/win/d3d9/gapi_d3d9.h"
41 41
42 namespace o3d { 42 namespace o3d {
43 namespace command_buffer { 43 namespace command_buffer {
44 namespace o3d {
44 45
45 // Destroys the D3D9 vertex buffer. 46 // Destroys the D3D9 vertex buffer.
46 VertexBufferD3D9::~VertexBufferD3D9() { 47 VertexBufferD3D9::~VertexBufferD3D9() {
47 DCHECK(d3d_vertex_buffer_ != NULL); 48 DCHECK(d3d_vertex_buffer_ != NULL);
48 if (d3d_vertex_buffer_) { 49 if (d3d_vertex_buffer_) {
49 d3d_vertex_buffer_->Release(); 50 d3d_vertex_buffer_->Release();
50 d3d_vertex_buffer_ = NULL; 51 d3d_vertex_buffer_ = NULL;
51 } 52 }
52 } 53 }
53 54
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 unsigned int semantic_index) { 426 unsigned int semantic_index) {
426 if (vertex_buffer_id == current_vertex_struct_) validate_streams_ = true; 427 if (vertex_buffer_id == current_vertex_struct_) validate_streams_ = true;
427 VertexStructD3D9 *vertex_struct = vertex_structs_.Get(vertex_struct_id); 428 VertexStructD3D9 *vertex_struct = vertex_structs_.Get(vertex_struct_id);
428 if (!vertex_struct || input_index >= vertex_struct->count()) 429 if (!vertex_struct || input_index >= vertex_struct->count())
429 return parse_error::kParseInvalidArguments; 430 return parse_error::kParseInvalidArguments;
430 vertex_struct->SetInput(input_index, vertex_buffer_id, offset, stride, type, 431 vertex_struct->SetInput(input_index, vertex_buffer_id, offset, stride, type,
431 semantic, semantic_index); 432 semantic, semantic_index);
432 return parse_error::kParseNoError; 433 return parse_error::kParseNoError;
433 } 434 }
434 435
436 } // namespace o3d
435 } // namespace command_buffer 437 } // namespace command_buffer
436 } // namespace o3d 438 } // namespace o3d
OLDNEW
« no previous file with comments | « command_buffer/service/win/d3d9/geometry_d3d9.h ('k') | command_buffer/service/win/d3d9/render_surface_d3d9.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698