OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BACKING_STORE_H__ |
| 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BACKING_STORE_H__ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "third_party/skia/include/core/SkBitmap.h" |
| 12 #include "ui/gfx/size.h" |
| 13 |
| 14 class SkCanvas; |
| 15 class TransportDIB; |
| 16 |
| 17 namespace gfx { |
| 18 class Canvas; |
| 19 class Point; |
| 20 class Rect; |
| 21 } |
| 22 |
| 23 class BrowserPluginBackingStore { |
| 24 public: |
| 25 BrowserPluginBackingStore(const gfx::Size& size); |
| 26 virtual ~BrowserPluginBackingStore(); |
| 27 |
| 28 void PaintToBackingStore( |
| 29 const gfx::Rect& bitmap_rect, |
| 30 const std::vector<gfx::Rect>& copy_rects, |
| 31 TransportDIB* dib); |
| 32 |
| 33 void ScrollBackingStore(int dx, |
| 34 int dy, |
| 35 const gfx::Rect& clip_rect, |
| 36 const gfx::Size& view_size); |
| 37 |
| 38 const gfx::Size& GetSize() const { return size_; } |
| 39 |
| 40 const SkBitmap& GetBitmap() const { return bitmap_; } |
| 41 |
| 42 private: |
| 43 gfx::Size size_; |
| 44 SkBitmap bitmap_; |
| 45 scoped_ptr<SkCanvas> canvas_; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(BrowserPluginBackingStore); |
| 48 }; |
| 49 |
| 50 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BACKING_STORE_H__ |
OLD | NEW |