| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 15 matching lines...) Expand all Loading... |
| 26 CONTENT_EXPORT BackingStoreSkia( | 26 CONTENT_EXPORT BackingStoreSkia( |
| 27 RenderWidgetHost* widget, | 27 RenderWidgetHost* widget, |
| 28 const gfx::Size& size); | 28 const gfx::Size& size); |
| 29 | 29 |
| 30 virtual ~BackingStoreSkia(); | 30 virtual ~BackingStoreSkia(); |
| 31 | 31 |
| 32 CONTENT_EXPORT void SkiaShowRect(const gfx::Point& point, | 32 CONTENT_EXPORT void SkiaShowRect(const gfx::Point& point, |
| 33 gfx::Canvas* canvas); | 33 gfx::Canvas* canvas); |
| 34 | 34 |
| 35 // BackingStore implementation. | 35 // BackingStore implementation. |
| 36 virtual size_t MemorySize(); | 36 virtual size_t MemorySize() OVERRIDE; |
| 37 virtual void PaintToBackingStore( | 37 virtual void PaintToBackingStore( |
| 38 RenderProcessHost* process, | 38 RenderProcessHost* process, |
| 39 TransportDIB::Id bitmap, | 39 TransportDIB::Id bitmap, |
| 40 const gfx::Rect& bitmap_rect, | 40 const gfx::Rect& bitmap_rect, |
| 41 const std::vector<gfx::Rect>& copy_rects, | 41 const std::vector<gfx::Rect>& copy_rects, |
| 42 const base::Closure& completion_callback, | 42 const base::Closure& completion_callback, |
| 43 bool* scheduled_completion_callback); | 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); | 45 skia::PlatformCanvas* 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); | 48 const gfx::Size& view_size) OVERRIDE; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 SkBitmap bitmap_; | 51 SkBitmap bitmap_; |
| 52 | 52 |
| 53 scoped_ptr<SkCanvas> canvas_; | 53 scoped_ptr<SkCanvas> canvas_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(BackingStoreSkia); | 55 DISALLOW_COPY_AND_ASSIGN(BackingStoreSkia); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_SKIA_H_ | 58 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_SKIA_H_ |
| OLD | NEW |