| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef MOJO_SERVICES_GFX_IMAGES_CPP_IMAGE_PIPE_ENDPOINT_H_ | 5 #ifndef MOJO_SERVICES_GFX_IMAGES_CPP_IMAGE_PIPE_ENDPOINT_H_ |
| 6 #define MOJO_SERVICES_GFX_IMAGES_CPP_IMAGE_PIPE_ENDPOINT_H_ | 6 #define MOJO_SERVICES_GFX_IMAGES_CPP_IMAGE_PIPE_ENDPOINT_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <unordered_map> | 10 #include <unordered_map> |
| 11 #include <unordered_set> | 11 #include <unordered_set> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "mojo/public/c/system/macros.h" | 14 #include "mojo/public/cpp/system/macros.h" |
| 15 #include "mojo/services/gfx/images/interfaces/image_pipe.mojom.h" | 15 #include "mojo/services/gfx/images/interfaces/image_pipe.mojom.h" |
| 16 | 16 |
| 17 namespace image_pipe { | 17 namespace image_pipe { |
| 18 | 18 |
| 19 class ImagePipeEndpoint { | 19 class ImagePipeEndpoint { |
| 20 public: | 20 public: |
| 21 ImagePipeEndpoint(bool is_producer, | 21 ImagePipeEndpoint(bool is_producer, |
| 22 std::function<void()> fatal_error_handler); | 22 std::function<void()> fatal_error_handler); |
| 23 virtual ~ImagePipeEndpoint(); | 23 virtual ~ImagePipeEndpoint(); |
| 24 | 24 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 // images that have been aquired by the producer | 69 // images that have been aquired by the producer |
| 70 std::unordered_set<uint32_t> producer_owned_ids_; | 70 std::unordered_set<uint32_t> producer_owned_ids_; |
| 71 // images that have been released by the producer but have not been aquired | 71 // images that have been released by the producer but have not been aquired |
| 72 // by the consumer | 72 // by the consumer |
| 73 std::deque<uint32_t> producer_acquirable_ids_; | 73 std::deque<uint32_t> producer_acquirable_ids_; |
| 74 | 74 |
| 75 bool is_producer_; | 75 bool is_producer_; |
| 76 bool is_checked_; | 76 bool is_checked_; |
| 77 std::function<void()> fatal_error_handler_; | 77 std::function<void()> fatal_error_handler_; |
| 78 |
| 79 MOJO_DISALLOW_COPY_AND_ASSIGN(ImagePipeEndpoint); |
| 78 }; | 80 }; |
| 79 } | 81 |
| 82 } // namespace image_pipe |
| 80 | 83 |
| 81 #endif // MOJO_SERVICES_GFX_IMAGES_CPP_IMAGE_PIPE_ENDPOINT_H_ | 84 #endif // MOJO_SERVICES_GFX_IMAGES_CPP_IMAGE_PIPE_ENDPOINT_H_ |
| OLD | NEW |