| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 void UpdateGPUMemoryUsage() const; | 169 void UpdateGPUMemoryUsage() const; |
| 170 static intptr_t GetGlobalGPUMemoryUsage() { return global_gpu_memory_usage_; } | 170 static intptr_t GetGlobalGPUMemoryUsage() { return global_gpu_memory_usage_; } |
| 171 static unsigned GetGlobalAcceleratedImageBufferCount() { | 171 static unsigned GetGlobalAcceleratedImageBufferCount() { |
| 172 return global_accelerated_image_buffer_count_; | 172 return global_accelerated_image_buffer_count_; |
| 173 } | 173 } |
| 174 intptr_t GetGPUMemoryUsage() { return gpu_memory_usage_; } | 174 intptr_t GetGPUMemoryUsage() { return gpu_memory_usage_; } |
| 175 | 175 |
| 176 void DisableAcceleration(); | 176 void DisableAcceleration(); |
| 177 void SetSurface(std::unique_ptr<ImageBufferSurface>); | 177 void SetSurface(std::unique_ptr<ImageBufferSurface>); |
| 178 | 178 |
| 179 void SetNeedsCompositingUpdate(); |
| 180 |
| 179 WeakPtrFactory<ImageBuffer> weak_ptr_factory_; | 181 WeakPtrFactory<ImageBuffer> weak_ptr_factory_; |
| 180 | 182 |
| 181 protected: | 183 protected: |
| 182 ImageBuffer(std::unique_ptr<ImageBufferSurface>); | 184 ImageBuffer(std::unique_ptr<ImageBufferSurface>); |
| 183 | 185 |
| 184 private: | 186 private: |
| 185 enum SnapshotState { | 187 enum SnapshotState { |
| 186 kInitialSnapshotState, | 188 kInitialSnapshotState, |
| 187 kDidAcquireSnapshot, | 189 kDidAcquireSnapshot, |
| 188 kDrawnToAfterSnapshot, | 190 kDrawnToAfterSnapshot, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 213 int Height() const { return size_.Height(); } | 215 int Height() const { return size_.Height(); } |
| 214 int Width() const { return size_.Width(); } | 216 int Width() const { return size_.Width(); } |
| 215 | 217 |
| 216 const unsigned char* data_; | 218 const unsigned char* data_; |
| 217 const IntSize size_; | 219 const IntSize size_; |
| 218 }; | 220 }; |
| 219 | 221 |
| 220 } // namespace blink | 222 } // namespace blink |
| 221 | 223 |
| 222 #endif // ImageBuffer_h | 224 #endif // ImageBuffer_h |
| OLD | NEW |