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_MAC_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
11 #include "chrome/browser/renderer_host/backing_store.h" | 11 #include "chrome/browser/renderer_host/backing_store.h" |
12 | 12 |
13 class BackingStoreMac : public BackingStore { | 13 class BackingStoreMac : public BackingStore { |
14 public: | 14 public: |
15 BackingStoreMac(RenderWidgetHost* widget, const gfx::Size& size); | 15 BackingStoreMac(RenderWidgetHost* widget, const gfx::Size& size); |
16 virtual ~BackingStoreMac(); | 16 virtual ~BackingStoreMac(); |
17 | 17 |
18 // A CGLayer that stores the contents of the backing store, cached in GPU | 18 // A CGLayer that stores the contents of the backing store, cached in GPU |
19 // memory if possible. | 19 // memory if possible. |
20 CGLayerRef cg_layer() { return cg_layer_; } | 20 CGLayerRef cg_layer() { return cg_layer_; } |
(...skipping 20 matching lines...) Expand all Loading... |
41 // context, sized properly for the backing store. Returns NULL if the owner | 41 // context, sized properly for the backing store. Returns NULL if the owner |
42 // is not in a window with a CGContext. cg_layer_ is assigned this method's | 42 // is not in a window with a CGContext. cg_layer_ is assigned this method's |
43 // result. | 43 // result. |
44 CGLayerRef CreateCGLayer(); | 44 CGLayerRef CreateCGLayer(); |
45 | 45 |
46 // Creates a CGBitmapContext sized properly for the backing store. The | 46 // Creates a CGBitmapContext sized properly for the backing store. The |
47 // owner view need not be in a window. cg_bitmap_ is assigned this method's | 47 // owner view need not be in a window. cg_bitmap_ is assigned this method's |
48 // result. | 48 // result. |
49 CGContextRef CreateCGBitmapContext(); | 49 CGContextRef CreateCGBitmapContext(); |
50 | 50 |
51 scoped_cftyperef<CGContextRef> cg_bitmap_; | 51 base::mac::ScopedCFTypeRef<CGContextRef> cg_bitmap_; |
52 scoped_cftyperef<CGLayerRef> cg_layer_; | 52 base::mac::ScopedCFTypeRef<CGLayerRef> cg_layer_; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(BackingStoreMac); | 54 DISALLOW_COPY_AND_ASSIGN(BackingStoreMac); |
55 }; | 55 }; |
56 | 56 |
57 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ | 57 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ |
OLD | NEW |