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

Side by Side Diff: content/browser/renderer_host/backing_store_skia.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_SKIA_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_SKIA_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_SKIA_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_SKIA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/browser/renderer_host/backing_store.h" 10 #include "content/browser/renderer_host/backing_store.h"
(...skipping 25 matching lines...) Expand all
36 CONTENT_EXPORT void SkiaShowRect(const gfx::Point& point, 36 CONTENT_EXPORT void SkiaShowRect(const gfx::Point& point,
37 gfx::Canvas* canvas); 37 gfx::Canvas* canvas);
38 38
39 // BackingStore implementation. 39 // BackingStore implementation.
40 virtual size_t MemorySize() OVERRIDE; 40 virtual size_t MemorySize() OVERRIDE;
41 virtual void PaintToBackingStore( 41 virtual void PaintToBackingStore(
42 content::RenderProcessHost* process, 42 content::RenderProcessHost* process,
43 TransportDIB::Id bitmap, 43 TransportDIB::Id bitmap,
44 const gfx::Rect& bitmap_rect, 44 const gfx::Rect& bitmap_rect,
45 const std::vector<gfx::Rect>& copy_rects, 45 const std::vector<gfx::Rect>& copy_rects,
46 float scale_factor,
46 const base::Closure& completion_callback, 47 const base::Closure& completion_callback,
47 bool* scheduled_completion_callback) OVERRIDE; 48 bool* scheduled_completion_callback) OVERRIDE;
48 virtual bool CopyFromBackingStore(const gfx::Rect& rect, 49 virtual bool CopyFromBackingStore(const gfx::Rect& rect,
49 skia::PlatformCanvas* output) OVERRIDE; 50 skia::PlatformCanvas* output) OVERRIDE;
50 virtual void ScrollBackingStore(int dx, int dy, 51 virtual void ScrollBackingStore(int dx, int dy,
51 const gfx::Rect& clip_rect, 52 const gfx::Rect& clip_rect,
52 const gfx::Size& view_size) OVERRIDE; 53 const gfx::Size& view_size) OVERRIDE;
53 54
54 private: 55 private:
55 SkBitmap bitmap_; 56 SkBitmap bitmap_;
56 57
57 scoped_ptr<SkCanvas> canvas_; 58 scoped_ptr<SkCanvas> canvas_;
58 int device_scale_factor_; 59 int device_scale_factor_;
59 60
60 DISALLOW_COPY_AND_ASSIGN(BackingStoreSkia); 61 DISALLOW_COPY_AND_ASSIGN(BackingStoreSkia);
61 }; 62 };
62 63
63 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_SKIA_H_ 64 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_SKIA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698