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 #pragma once | |
8 | 7 |
9 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
10 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
11 #include "content/browser/renderer_host/backing_store.h" | 10 #include "content/browser/renderer_host/backing_store.h" |
12 | 11 |
13 class BackingStoreMac : public BackingStore { | 12 class BackingStoreMac : public BackingStore { |
14 public: | 13 public: |
15 // |size| is in view units, |device_scale_factor| is the backingScaleFactor. | 14 // |size| is in view units, |device_scale_factor| is the backingScaleFactor. |
16 // The pixel size of the backing store is size.Scale(device_scale_factor). | 15 // The pixel size of the backing store is size.Scale(device_scale_factor). |
17 BackingStoreMac(content::RenderWidgetHost* widget, | 16 BackingStoreMac(content::RenderWidgetHost* widget, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 base::mac::ScopedCFTypeRef<CGContextRef> cg_bitmap_; | 63 base::mac::ScopedCFTypeRef<CGContextRef> cg_bitmap_; |
65 base::mac::ScopedCFTypeRef<CGLayerRef> cg_layer_; | 64 base::mac::ScopedCFTypeRef<CGLayerRef> cg_layer_; |
66 | 65 |
67 // Number of physical pixels per view unit. This is 1 or 2 in practice. | 66 // Number of physical pixels per view unit. This is 1 or 2 in practice. |
68 float device_scale_factor_; | 67 float device_scale_factor_; |
69 | 68 |
70 DISALLOW_COPY_AND_ASSIGN(BackingStoreMac); | 69 DISALLOW_COPY_AND_ASSIGN(BackingStoreMac); |
71 }; | 70 }; |
72 | 71 |
73 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ | 72 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ |
OLD | NEW |