Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1267)

Side by Side Diff: content/browser/renderer_host/backing_store_mac.h

Issue 10540144: Tag TransportDIBs with the device scale factor they expect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
(...skipping 16 matching lines...) Expand all
27 // corresponding Cocoa view has not been inserted into an NSWindow yet. 27 // corresponding Cocoa view has not been inserted into an NSWindow yet.
28 CGContextRef cg_bitmap() { return cg_bitmap_; } 28 CGContextRef cg_bitmap() { return cg_bitmap_; }
29 29
30 // BackingStore implementation. 30 // BackingStore implementation.
31 virtual size_t MemorySize() OVERRIDE; 31 virtual size_t MemorySize() OVERRIDE;
32 virtual void PaintToBackingStore( 32 virtual void PaintToBackingStore(
33 content::RenderProcessHost* process, 33 content::RenderProcessHost* process,
34 TransportDIB::Id bitmap, 34 TransportDIB::Id bitmap,
35 const gfx::Rect& bitmap_rect, 35 const gfx::Rect& bitmap_rect,
36 const std::vector<gfx::Rect>& copy_rects, 36 const std::vector<gfx::Rect>& copy_rects,
37 float scale_factor,
37 const base::Closure& completion_callback, 38 const base::Closure& completion_callback,
38 bool* scheduled_completion_callback) OVERRIDE; 39 bool* scheduled_completion_callback) OVERRIDE;
39 virtual bool CopyFromBackingStore(const gfx::Rect& rect, 40 virtual bool CopyFromBackingStore(const gfx::Rect& rect,
40 skia::PlatformCanvas* output) OVERRIDE; 41 skia::PlatformCanvas* output) OVERRIDE;
41 virtual void ScrollBackingStore(int dx, int dy, 42 virtual void ScrollBackingStore(int dx, int dy,
42 const gfx::Rect& clip_rect, 43 const gfx::Rect& clip_rect,
43 const gfx::Size& view_size) OVERRIDE; 44 const gfx::Size& view_size) OVERRIDE;
44 45
45 void CopyFromBackingStoreToCGContext(const CGRect& dest_rect, 46 void CopyFromBackingStoreToCGContext(const CGRect& dest_rect,
46 CGContextRef context); 47 CGContextRef context);
(...skipping 13 matching lines...) Expand all
60 base::mac::ScopedCFTypeRef<CGContextRef> cg_bitmap_; 61 base::mac::ScopedCFTypeRef<CGContextRef> cg_bitmap_;
61 base::mac::ScopedCFTypeRef<CGLayerRef> cg_layer_; 62 base::mac::ScopedCFTypeRef<CGLayerRef> cg_layer_;
62 63
63 // Number of physical pixels per view unit. This is 1 or 2 in practice. 64 // Number of physical pixels per view unit. This is 1 or 2 in practice.
64 float device_scale_factor_; 65 float device_scale_factor_;
65 66
66 DISALLOW_COPY_AND_ASSIGN(BackingStoreMac); 67 DISALLOW_COPY_AND_ASSIGN(BackingStoreMac);
67 }; 68 };
68 69
69 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_ 70 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698