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

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

Issue 155188: Removing unneeded EffectStream class. Cleaning up data assignment for stream ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « command_buffer/service/win/d3d9/effect_d3d9.h ('k') | main.scons » ('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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 // Fills the Desc structure, appending name and semantic if any, and if enough 345 // Fills the Desc structure, appending name and semantic if any, and if enough
346 // room is available in the buffer. 346 // room is available in the buffer.
347 bool EffectD3D9::GetStreamDesc(unsigned int index, 347 bool EffectD3D9::GetStreamDesc(unsigned int index,
348 unsigned int size, 348 unsigned int size,
349 void *data) { 349 void *data) {
350 using effect_stream::Desc; 350 using effect_stream::Desc;
351 if (size < sizeof(Desc)) // NOLINT 351 if (size < sizeof(Desc)) // NOLINT
352 return false; 352 return false;
353 353
354 Desc stream = streams_[index];
355 Desc *desc = static_cast<Desc *>(data); 354 Desc *desc = static_cast<Desc *>(data);
356 memset(desc, 0, sizeof(*desc)); 355 *desc = streams_[index];
357 desc->semantic = stream.semantic;
358 desc->semantic_index = stream.semantic_index;
359 return true; 356 return true;
360 } 357 }
361 358
362 EffectParamD3D9::EffectParamD3D9(effect_param::DataType data_type, 359 EffectParamD3D9::EffectParamD3D9(effect_param::DataType data_type,
363 EffectD3D9 *effect, 360 EffectD3D9 *effect,
364 D3DXHANDLE handle) 361 D3DXHANDLE handle)
365 : EffectParam(data_type), 362 : EffectParam(data_type),
366 effect_(effect), 363 effect_(effect),
367 handle_(handle), 364 handle_(handle),
368 sampler_units_(NULL), 365 sampler_units_(NULL),
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 DCHECK(validate_effect_); 665 DCHECK(validate_effect_);
669 DCHECK(!current_effect_); 666 DCHECK(!current_effect_);
670 current_effect_ = effects_.Get(current_effect_id_); 667 current_effect_ = effects_.Get(current_effect_id_);
671 if (!current_effect_) return false; 668 if (!current_effect_) return false;
672 validate_effect_ = false; 669 validate_effect_ = false;
673 return current_effect_->Begin(this); 670 return current_effect_->Begin(this);
674 } 671 }
675 672
676 } // namespace command_buffer 673 } // namespace command_buffer
677 } // namespace o3d 674 } // namespace o3d
OLDNEW
« no previous file with comments | « command_buffer/service/win/d3d9/effect_d3d9.h ('k') | main.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698