Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 | 35 |
| 36 namespace cc { | 36 namespace cc { |
| 37 class SurfaceIdAllocator; | 37 class SurfaceIdAllocator; |
| 38 } | 38 } |
| 39 | 39 |
| 40 namespace gfx { | 40 namespace gfx { |
| 41 class Path; | 41 class Path; |
| 42 } | 42 } |
| 43 | 43 |
| 44 namespace exo { | 44 namespace exo { |
| 45 class AXTreeSourceSurface; | |
| 45 class Buffer; | 46 class Buffer; |
| 46 class Pointer; | 47 class Pointer; |
| 47 class SurfaceDelegate; | 48 class SurfaceDelegate; |
| 48 class SurfaceObserver; | 49 class SurfaceObserver; |
| 49 class Surface; | 50 class Surface; |
| 50 | 51 |
| 51 template <typename T> | 52 template <typename T> |
| 52 struct SurfaceProperty; | 53 struct SurfaceProperty; |
| 53 | 54 |
| 54 namespace subtle { | 55 namespace subtle { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 231 | 232 |
| 232 // Sets the |property| to its default value. Useful for avoiding a cast when | 233 // Sets the |property| to its default value. Useful for avoiding a cast when |
| 233 // setting to NULL. | 234 // setting to NULL. |
| 234 template <typename T> | 235 template <typename T> |
| 235 void ClearProperty(const SurfaceProperty<T>* property); | 236 void ClearProperty(const SurfaceProperty<T>* property); |
| 236 | 237 |
| 237 bool HasPendingDamageForTesting(const gfx::Rect& damage) const { | 238 bool HasPendingDamageForTesting(const gfx::Rect& damage) const { |
| 238 return pending_damage_.contains(gfx::RectToSkIRect(damage)); | 239 return pending_damage_.contains(gfx::RectToSkIRect(damage)); |
| 239 } | 240 } |
| 240 | 241 |
| 242 // Sets the accessible tree source for this surface. | |
| 243 void set_ax_tree_source(AXTreeSourceSurface* tree) { ax_tree_source_ = tree; } | |
| 244 AXTreeSourceSurface* ax_tree_source() { return ax_tree_source_; } | |
| 245 | |
| 241 private: | 246 private: |
| 242 struct State { | 247 struct State { |
| 243 State(); | 248 State(); |
| 244 ~State(); | 249 ~State(); |
| 245 | 250 |
| 246 bool operator==(const State& other); | 251 bool operator==(const State& other); |
| 247 bool operator!=(const State& other) { return !(*this == other); } | 252 bool operator!=(const State& other) { return !(*this == other); } |
| 248 | 253 |
| 249 SkRegion opaque_region; | 254 SkRegion opaque_region; |
| 250 SkRegion input_region; | 255 SkRegion input_region; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 410 | 415 |
| 411 // Surface observer list. Surface does not own the observers. | 416 // Surface observer list. Surface does not own the observers. |
| 412 base::ObserverList<SurfaceObserver, true> observers_; | 417 base::ObserverList<SurfaceObserver, true> observers_; |
| 413 | 418 |
| 414 // A reference factory that uses the compositor frame sink holder provided | 419 // A reference factory that uses the compositor frame sink holder provided |
| 415 // to this class to construct surface references. This object is passed to | 420 // to this class to construct surface references. This object is passed to |
| 416 // ui::Layer::SetShowSurface because the layer needs to know how to add | 421 // ui::Layer::SetShowSurface because the layer needs to know how to add |
| 417 // references to surfaces. | 422 // references to surfaces. |
| 418 scoped_refptr<cc::SurfaceReferenceFactory> surface_reference_factory_; | 423 scoped_refptr<cc::SurfaceReferenceFactory> surface_reference_factory_; |
| 419 | 424 |
| 425 AXTreeSourceSurface* ax_tree_source_; | |
|
dmazzoni
2017/01/19 19:48:16
Comment who owns this. If this is owned by this cl
David Tseng
2017/01/20 23:00:56
Not owned by this class (commented).
| |
| 426 | |
| 420 DISALLOW_COPY_AND_ASSIGN(Surface); | 427 DISALLOW_COPY_AND_ASSIGN(Surface); |
| 421 }; | 428 }; |
| 422 | 429 |
| 423 } // namespace exo | 430 } // namespace exo |
| 424 | 431 |
| 425 #endif // COMPONENTS_EXO_SURFACE_H_ | 432 #endif // COMPONENTS_EXO_SURFACE_H_ |
| OLD | NEW |