| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 void UpdateGPUMemoryUsage() const; | 174 void UpdateGPUMemoryUsage() const; |
| 175 static intptr_t GetGlobalGPUMemoryUsage() { return global_gpu_memory_usage_; } | 175 static intptr_t GetGlobalGPUMemoryUsage() { return global_gpu_memory_usage_; } |
| 176 static unsigned GetGlobalAcceleratedImageBufferCount() { | 176 static unsigned GetGlobalAcceleratedImageBufferCount() { |
| 177 return global_accelerated_image_buffer_count_; | 177 return global_accelerated_image_buffer_count_; |
| 178 } | 178 } |
| 179 intptr_t GetGPUMemoryUsage() { return gpu_memory_usage_; } | 179 intptr_t GetGPUMemoryUsage() { return gpu_memory_usage_; } |
| 180 | 180 |
| 181 void DisableAcceleration(); | 181 void DisableAcceleration(); |
| 182 void SetSurface(std::unique_ptr<ImageBufferSurface>); | 182 void SetSurface(std::unique_ptr<ImageBufferSurface>); |
| 183 | 183 |
| 184 void SetNeedsCompositingUpdate(); |
| 185 |
| 184 WeakPtrFactory<ImageBuffer> weak_ptr_factory_; | 186 WeakPtrFactory<ImageBuffer> weak_ptr_factory_; |
| 185 | 187 |
| 186 protected: | 188 protected: |
| 187 ImageBuffer(std::unique_ptr<ImageBufferSurface>); | 189 ImageBuffer(std::unique_ptr<ImageBufferSurface>); |
| 188 | 190 |
| 189 private: | 191 private: |
| 190 enum SnapshotState { | 192 enum SnapshotState { |
| 191 kInitialSnapshotState, | 193 kInitialSnapshotState, |
| 192 kDidAcquireSnapshot, | 194 kDidAcquireSnapshot, |
| 193 kDrawnToAfterSnapshot, | 195 kDrawnToAfterSnapshot, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 218 int Height() const { return size_.Height(); } | 220 int Height() const { return size_.Height(); } |
| 219 int Width() const { return size_.Width(); } | 221 int Width() const { return size_.Width(); } |
| 220 | 222 |
| 221 const unsigned char* data_; | 223 const unsigned char* data_; |
| 222 const IntSize size_; | 224 const IntSize size_; |
| 223 }; | 225 }; |
| 224 | 226 |
| 225 } // namespace blink | 227 } // namespace blink |
| 226 | 228 |
| 227 #endif // ImageBuffer_h | 229 #endif // ImageBuffer_h |
| OLD | NEW |