OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ |
6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ | 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 gfx::Rect viewport, | 69 gfx::Rect viewport, |
70 gfx::Rect clip, | 70 gfx::Rect clip, |
71 gfx::Rect viewport_rect_for_tile_priority, | 71 gfx::Rect viewport_rect_for_tile_priority, |
72 const gfx::Transform& transform_for_tile_priority); | 72 const gfx::Transform& transform_for_tile_priority); |
73 void ReturnResources(const cc::CompositorFrameAck& frame_ack); | 73 void ReturnResources(const cc::CompositorFrameAck& frame_ack); |
74 scoped_ptr<cc::CompositorFrame> DemandDrawSw(SkCanvas* canvas); | 74 scoped_ptr<cc::CompositorFrame> DemandDrawSw(SkCanvas* canvas); |
75 void SetMemoryPolicy(size_t bytes_limit); | 75 void SetMemoryPolicy(size_t bytes_limit); |
76 void SetTreeActivationCallback(const base::Closure& callback); | 76 void SetTreeActivationCallback(const base::Closure& callback); |
77 void GetMessagesToDeliver(ScopedVector<IPC::Message>* messages); | 77 void GetMessagesToDeliver(ScopedVector<IPC::Message>* messages); |
78 | 78 |
| 79 size_t GetMemoryPolicy() const { |
| 80 return memory_policy_.bytes_limit_when_visible; |
| 81 } |
| 82 |
79 private: | 83 private: |
80 class SoftwareDevice; | 84 class SoftwareDevice; |
81 friend class SoftwareDevice; | 85 friend class SoftwareDevice; |
82 | 86 |
83 void InvokeComposite(const gfx::Transform& transform, | 87 void InvokeComposite(const gfx::Transform& transform, |
84 gfx::Rect viewport, | 88 gfx::Rect viewport, |
85 gfx::Rect clip, | 89 gfx::Rect clip, |
86 gfx::Rect viewport_rect_for_tile_priority, | 90 gfx::Rect viewport_rect_for_tile_priority, |
87 gfx::Transform transform_for_tile_priority, | 91 gfx::Transform transform_for_tile_priority, |
88 bool hardware_draw); | 92 bool hardware_draw); |
(...skipping 19 matching lines...) Expand all Loading... |
108 scoped_ptr<cc::CompositorFrame> frame_holder_; | 112 scoped_ptr<cc::CompositorFrame> frame_holder_; |
109 | 113 |
110 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; | 114 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; |
111 | 115 |
112 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 116 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
113 }; | 117 }; |
114 | 118 |
115 } // namespace content | 119 } // namespace content |
116 | 120 |
117 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ | 121 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ |
OLD | NEW |