| OLD | NEW |
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 transfer_memory_size_(transfer_memory_size), | 65 transfer_memory_size_(transfer_memory_size), |
| 66 transfer_shm_(command_buffer::kRPCInvalidHandle), | 66 transfer_shm_(command_buffer::kRPCInvalidHandle), |
| 67 transfer_shm_id_(0), | 67 transfer_shm_id_(0), |
| 68 transfer_shm_address_(NULL), | 68 transfer_shm_address_(NULL), |
| 69 sync_interface_(NULL), | 69 sync_interface_(NULL), |
| 70 helper_(NULL), | 70 helper_(NULL), |
| 71 allocator_(NULL), | 71 allocator_(NULL), |
| 72 cb_server_(NULL), | 72 cb_server_(NULL), |
| 73 frame_token_(0), | 73 frame_token_(0), |
| 74 state_manager_(new StateManager) { | 74 state_manager_(new StateManager) { |
| 75 DCHECK_GT(command_buffer_size, 0); | 75 DCHECK_GT(command_buffer_size, 0U); |
| 76 DCHECK_GT(transfer_memory_size, 0); | 76 DCHECK_GT(transfer_memory_size, 0U); |
| 77 transfer_shm_ = command_buffer::CreateShm(transfer_memory_size); | 77 transfer_shm_ = command_buffer::CreateShm(transfer_memory_size); |
| 78 transfer_shm_address_ = command_buffer::MapShm(transfer_shm_, | 78 transfer_shm_address_ = command_buffer::MapShm(transfer_shm_, |
| 79 transfer_memory_size); | 79 transfer_memory_size); |
| 80 state_manager_->AddStateHandlers(this); | 80 state_manager_->AddStateHandlers(this); |
| 81 } | 81 } |
| 82 | 82 |
| 83 RendererCB::~RendererCB() { | 83 RendererCB::~RendererCB() { |
| 84 Destroy(); | 84 Destroy(); |
| 85 command_buffer::UnmapShm(transfer_shm_address_, transfer_memory_size_); | 85 command_buffer::UnmapShm(transfer_shm_address_, transfer_memory_size_); |
| 86 command_buffer::DestroyShm(transfer_shm_); | 86 command_buffer::DestroyShm(transfer_shm_); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 RenderDepthStencilSurface::Ref RendererCB::CreateDepthStencilSurface( | 339 RenderDepthStencilSurface::Ref RendererCB::CreateDepthStencilSurface( |
| 340 int width, | 340 int width, |
| 341 int height) { | 341 int height) { |
| 342 return RenderDepthStencilSurface::Ref( | 342 return RenderDepthStencilSurface::Ref( |
| 343 new RenderDepthStencilSurfaceCB(service_locator(), | 343 new RenderDepthStencilSurfaceCB(service_locator(), |
| 344 width, | 344 width, |
| 345 height, | 345 height, |
| 346 this)); | 346 this)); |
| 347 } | 347 } |
| 348 } // namespace o3d | 348 } // namespace o3d |
| OLD | NEW |