OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // A class to emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
6 | 6 |
7 #include "../client/gles2_implementation.h" | 7 #include "../client/gles2_implementation.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 scoped_array<int8> collection_buffer_; | 359 scoped_array<int8> collection_buffer_; |
360 | 360 |
361 DISALLOW_COPY_AND_ASSIGN(ClientSideBufferHelper); | 361 DISALLOW_COPY_AND_ASSIGN(ClientSideBufferHelper); |
362 }; | 362 }; |
363 | 363 |
364 #if !defined(_MSC_VER) | 364 #if !defined(_MSC_VER) |
365 const size_t GLES2Implementation::kMaxSizeOfSimpleResult; | 365 const size_t GLES2Implementation::kMaxSizeOfSimpleResult; |
366 const unsigned int GLES2Implementation::kStartingOffset; | 366 const unsigned int GLES2Implementation::kStartingOffset; |
367 #endif | 367 #endif |
368 | 368 |
| 369 GLES2Implementation::GLCachedState::IntState::IntState() |
| 370 : max_combined_texture_image_units(0), |
| 371 max_cube_map_texture_size(0), |
| 372 max_fragment_uniform_vectors(0), |
| 373 max_renderbuffer_size(0), |
| 374 max_texture_image_units(0), |
| 375 max_texture_size(0), |
| 376 max_varying_vectors(0), |
| 377 max_vertex_attribs(0), |
| 378 max_vertex_texture_image_units(0), |
| 379 max_vertex_uniform_vectors(0), |
| 380 num_compressed_texture_formats(0), |
| 381 num_shader_binary_formats(0) { |
| 382 } |
| 383 |
369 GLES2Implementation::SingleThreadChecker::SingleThreadChecker( | 384 GLES2Implementation::SingleThreadChecker::SingleThreadChecker( |
370 GLES2Implementation* gles2_implementation) | 385 GLES2Implementation* gles2_implementation) |
371 : gles2_implementation_(gles2_implementation) { | 386 : gles2_implementation_(gles2_implementation) { |
372 GPU_CHECK_EQ(0, gles2_implementation_->use_count_); | 387 GPU_CHECK_EQ(0, gles2_implementation_->use_count_); |
373 ++gles2_implementation_->use_count_; | 388 ++gles2_implementation_->use_count_; |
374 } | 389 } |
375 | 390 |
376 GLES2Implementation::SingleThreadChecker::~SingleThreadChecker() { | 391 GLES2Implementation::SingleThreadChecker::~SingleThreadChecker() { |
377 --gles2_implementation_->use_count_; | 392 --gles2_implementation_->use_count_; |
378 GPU_CHECK_EQ(0, gles2_implementation_->use_count_); | 393 GPU_CHECK_EQ(0, gles2_implementation_->use_count_); |
(...skipping 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3324 helper_->GenMailboxCHROMIUM(kResultBucketId); | 3339 helper_->GenMailboxCHROMIUM(kResultBucketId); |
3325 | 3340 |
3326 std::vector<GLbyte> result; | 3341 std::vector<GLbyte> result; |
3327 GetBucketContents(kResultBucketId, &result); | 3342 GetBucketContents(kResultBucketId, &result); |
3328 | 3343 |
3329 std::copy(result.begin(), result.end(), mailbox); | 3344 std::copy(result.begin(), result.end(), mailbox); |
3330 } | 3345 } |
3331 | 3346 |
3332 } // namespace gles2 | 3347 } // namespace gles2 |
3333 } // namespace gpu | 3348 } // namespace gpu |
OLD | NEW |