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 #ifndef UI_COMPOSITOR_COMPOSITOR_H_ | 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_ |
6 #define UI_COMPOSITOR_COMPOSITOR_H_ | 6 #define UI_COMPOSITOR_COMPOSITOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 class SkBitmap; | 25 class SkBitmap; |
26 | 26 |
27 namespace base { | 27 namespace base { |
28 class RunLoop; | 28 class RunLoop; |
29 } | 29 } |
30 | 30 |
31 namespace cc { | 31 namespace cc { |
32 class ContextProvider; | 32 class ContextProvider; |
33 class Layer; | 33 class Layer; |
| 34 class LayerTreeDebugState; |
34 class LayerTreeHost; | 35 class LayerTreeHost; |
35 } | 36 } |
36 | 37 |
37 namespace gfx { | 38 namespace gfx { |
38 class GLContext; | 39 class GLContext; |
39 class GLSurface; | 40 class GLSurface; |
40 class GLShareGroup; | 41 class GLShareGroup; |
41 class Point; | 42 class Point; |
42 class Rect; | 43 class Rect; |
43 } | 44 } |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 virtual scoped_refptr<cc::ContextProvider> | 357 virtual scoped_refptr<cc::ContextProvider> |
357 OffscreenContextProviderForMainThread() OVERRIDE; | 358 OffscreenContextProviderForMainThread() OVERRIDE; |
358 virtual scoped_refptr<cc::ContextProvider> | 359 virtual scoped_refptr<cc::ContextProvider> |
359 OffscreenContextProviderForCompositorThread() OVERRIDE; | 360 OffscreenContextProviderForCompositorThread() OVERRIDE; |
360 | 361 |
361 int last_started_frame() { return last_started_frame_; } | 362 int last_started_frame() { return last_started_frame_; } |
362 int last_ended_frame() { return last_ended_frame_; } | 363 int last_ended_frame() { return last_ended_frame_; } |
363 | 364 |
364 bool IsLocked() { return compositor_lock_ != NULL; } | 365 bool IsLocked() { return compositor_lock_ != NULL; } |
365 | 366 |
366 bool IsShowPaintRectsEnabled() const; | 367 const cc::LayerTreeDebugState& GetLayerTreeDebugState() const; |
367 void SetShowPaintRectsEnabled(bool enabled); | 368 void SetLayerTreeDebugState(const cc::LayerTreeDebugState& debug_state); |
368 | 369 |
369 private: | 370 private: |
370 friend class base::RefCounted<Compositor>; | 371 friend class base::RefCounted<Compositor>; |
371 friend class CompositorLock; | 372 friend class CompositorLock; |
372 | 373 |
373 // Called by CompositorLock. | 374 // Called by CompositorLock. |
374 void UnlockCompositor(); | 375 void UnlockCompositor(); |
375 | 376 |
376 // Called to release any pending CompositorLock | 377 // Called to release any pending CompositorLock |
377 void CancelCompositorLock(); | 378 void CancelCompositorLock(); |
(...skipping 28 matching lines...) Expand all Loading... |
406 bool disable_schedule_composite_; | 407 bool disable_schedule_composite_; |
407 | 408 |
408 CompositorLock* compositor_lock_; | 409 CompositorLock* compositor_lock_; |
409 | 410 |
410 DISALLOW_COPY_AND_ASSIGN(Compositor); | 411 DISALLOW_COPY_AND_ASSIGN(Compositor); |
411 }; | 412 }; |
412 | 413 |
413 } // namespace ui | 414 } // namespace ui |
414 | 415 |
415 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 416 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |