| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // Set if we need to send out a request to paint the view | 44 // Set if we need to send out a request to paint the view |
| 45 // to the renderer. | 45 // to the renderer. |
| 46 // painted_synchronously | 46 // painted_synchronously |
| 47 // Will be set by the function if the request was processed synchronously, | 47 // Will be set by the function if the request was processed synchronously, |
| 48 // and the bitmap is done being used. False means that the backing store | 48 // and the bitmap is done being used. False means that the backing store |
| 49 // will paint the bitmap at a later time and that the TransportDIB can't be | 49 // will paint the bitmap at a later time and that the TransportDIB can't be |
| 50 // freed (it will be the backing store's job to free it later). | 50 // freed (it will be the backing store's job to free it later). |
| 51 static void PrepareBackingStore( | 51 static void PrepareBackingStore( |
| 52 RenderWidgetHost* host, | 52 RenderWidgetHost* host, |
| 53 const gfx::Size& backing_store_size, | 53 const gfx::Size& backing_store_size, |
| 54 TransportDIB::Id bitmap, | 54 TransportDIB::Id dib_id, |
| 55 TransportDIB::Handle dib_handle, |
| 55 const gfx::Rect& bitmap_rect, | 56 const gfx::Rect& bitmap_rect, |
| 56 const std::vector<gfx::Rect>& copy_rects, | 57 const std::vector<gfx::Rect>& copy_rects, |
| 57 bool* needs_full_paint, | 58 bool* needs_full_paint, |
| 58 bool* painted_synchronously); | 59 bool* painted_synchronously); |
| 59 | 60 |
| 60 // Returns a matching backing store for the host. | 61 // Returns a matching backing store for the host. |
| 61 // Returns NULL if we fail to find one. | 62 // Returns NULL if we fail to find one. |
| 62 static BackingStore* Lookup(RenderWidgetHost* host); | 63 static BackingStore* Lookup(RenderWidgetHost* host); |
| 63 | 64 |
| 64 // Removes the backing store for the host. | 65 // Removes the backing store for the host. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 76 static size_t MemorySize(); | 77 static size_t MemorySize(); |
| 77 | 78 |
| 78 private: | 79 private: |
| 79 // Not intended for instantiation. | 80 // Not intended for instantiation. |
| 80 BackingStoreManager() {} | 81 BackingStoreManager() {} |
| 81 | 82 |
| 82 DISALLOW_COPY_AND_ASSIGN(BackingStoreManager); | 83 DISALLOW_COPY_AND_ASSIGN(BackingStoreManager); |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ | 86 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ |
| OLD | NEW |