| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_EXO_SURFACE_H_ | 5 #ifndef COMPONENTS_EXO_SURFACE_H_ |
| 6 #define COMPONENTS_EXO_SURFACE_H_ | 6 #define COMPONENTS_EXO_SURFACE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // contents of Buffers. It's keeped alive by references from | 61 // contents of Buffers. It's keeped alive by references from |
| 62 // release_callbacks_. It's destroyed when its owning Surface is destroyed and | 62 // release_callbacks_. It's destroyed when its owning Surface is destroyed and |
| 63 // the last outstanding release callback is called. | 63 // the last outstanding release callback is called. |
| 64 class SurfaceFactoryOwner : public base::RefCounted<SurfaceFactoryOwner>, | 64 class SurfaceFactoryOwner : public base::RefCounted<SurfaceFactoryOwner>, |
| 65 public cc::SurfaceFactoryClient { | 65 public cc::SurfaceFactoryClient { |
| 66 public: | 66 public: |
| 67 SurfaceFactoryOwner(); | 67 SurfaceFactoryOwner(); |
| 68 | 68 |
| 69 // Overridden from cc::SurfaceFactoryClient: | 69 // Overridden from cc::SurfaceFactoryClient: |
| 70 void ReturnResources(const cc::ReturnedResourceArray& resources) override; | 70 void ReturnResources(const cc::ReturnedResourceArray& resources) override; |
| 71 void WillDrawSurface(cc::SurfaceId id, const gfx::Rect& damage_rect) override; | 71 void WillDrawSurface(const cc::SurfaceId& id, |
| 72 const gfx::Rect& damage_rect) override; |
| 72 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; | 73 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 friend class base::RefCounted<SurfaceFactoryOwner>; | 76 friend class base::RefCounted<SurfaceFactoryOwner>; |
| 76 friend class Surface; | 77 friend class Surface; |
| 77 | 78 |
| 78 ~SurfaceFactoryOwner() override; | 79 ~SurfaceFactoryOwner() override; |
| 79 | 80 |
| 80 std::map<int, | 81 std::map<int, |
| 81 std::pair<scoped_refptr<SurfaceFactoryOwner>, | 82 std::pair<scoped_refptr<SurfaceFactoryOwner>, |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 400 |
| 400 // Surface observer list. Surface does not own the observers. | 401 // Surface observer list. Surface does not own the observers. |
| 401 base::ObserverList<SurfaceObserver, true> observers_; | 402 base::ObserverList<SurfaceObserver, true> observers_; |
| 402 | 403 |
| 403 DISALLOW_COPY_AND_ASSIGN(Surface); | 404 DISALLOW_COPY_AND_ASSIGN(Surface); |
| 404 }; | 405 }; |
| 405 | 406 |
| 406 } // namespace exo | 407 } // namespace exo |
| 407 | 408 |
| 408 #endif // COMPONENTS_EXO_SURFACE_H_ | 409 #endif // COMPONENTS_EXO_SURFACE_H_ |
| OLD | NEW |