| 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 CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
| 10 #include "content/browser/renderer_host/backing_store.h" | 10 #include "content/browser/renderer_host/backing_store.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 virtual size_t MemorySize() OVERRIDE; | 35 virtual size_t MemorySize() OVERRIDE; |
| 36 virtual void PaintToBackingStore( | 36 virtual void PaintToBackingStore( |
| 37 RenderProcessHost* process, | 37 RenderProcessHost* process, |
| 38 TransportDIB::Id bitmap, | 38 TransportDIB::Id bitmap, |
| 39 const gfx::Rect& bitmap_rect, | 39 const gfx::Rect& bitmap_rect, |
| 40 const std::vector<gfx::Rect>& copy_rects, | 40 const std::vector<gfx::Rect>& copy_rects, |
| 41 float scale_factor, | 41 float scale_factor, |
| 42 const base::Closure& completion_callback, | 42 const base::Closure& completion_callback, |
| 43 bool* scheduled_completion_callback) OVERRIDE; | 43 bool* scheduled_completion_callback) OVERRIDE; |
| 44 virtual bool CopyFromBackingStore(const gfx::Rect& rect, | 44 virtual bool CopyFromBackingStore(const gfx::Rect& rect, |
| 45 skia::PlatformCanvas* output) OVERRIDE; | 45 skia::PlatformBitmap* output) OVERRIDE; |
| 46 virtual void ScrollBackingStore(int dx, int dy, | 46 virtual void ScrollBackingStore(int dx, int dy, |
| 47 const gfx::Rect& clip_rect, | 47 const gfx::Rect& clip_rect, |
| 48 const gfx::Size& view_size) OVERRIDE; | 48 const gfx::Size& view_size) OVERRIDE; |
| 49 | 49 |
| 50 void CopyFromBackingStoreToCGContext(const CGRect& dest_rect, | 50 void CopyFromBackingStoreToCGContext(const CGRect& dest_rect, |
| 51 CGContextRef context); | 51 CGContextRef context); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 // Creates a CGLayer associated with its owner view's window's graphics | 54 // Creates a CGLayer associated with its owner view's window's graphics |
| 55 // context, sized properly for the backing store. Returns NULL if the owner | 55 // context, sized properly for the backing store. Returns NULL if the owner |
| (...skipping 11 matching lines...) Expand all Loading... |
| 67 | 67 |
| 68 // Number of physical pixels per view unit. This is 1 or 2 in practice. | 68 // Number of physical pixels per view unit. This is 1 or 2 in practice. |
| 69 float device_scale_factor_; | 69 float device_scale_factor_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(BackingStoreMac); | 71 DISALLOW_COPY_AND_ASSIGN(BackingStoreMac); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace content | 74 } // namespace content |
| 75 | 75 |
| 76 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ | 76 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ |
| OLD | NEW |