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

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

Issue 7800015: prune down content_dll change to just the CONTENT_EXPORTS (Closed)
Patch Set: update copyright headers, merge Created 9 years, 3 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
OLDNEW
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"
11 #include "content/common/content_export.h"
11 #include "third_party/skia/include/core/SkBitmap.h" 12 #include "third_party/skia/include/core/SkBitmap.h"
12 13
13 class SkCanvas; 14 class SkCanvas;
14 15
15 namespace gfx { 16 namespace gfx {
16 class Point; 17 class Point;
17 class Canvas; 18 class Canvas;
18 } 19 }
19 20
20 // A backing store that uses skia. This is a temporary backing store used by 21 // A backing store that uses skia. This is a temporary backing store used by
21 // RenderWidgetHostViewViews. In time, only GPU rendering will be used for 22 // RenderWidgetHostViewViews. In time, only GPU rendering will be used for
22 // RWHVV, and then this backing store will be removed. 23 // RWHVV, and then this backing store will be removed.
23 class BackingStoreSkia : public BackingStore { 24 class BackingStoreSkia : public BackingStore {
24 public: 25 public:
25 BackingStoreSkia(RenderWidgetHost* widget, const gfx::Size& size); 26 CONTENT_EXPORT BackingStoreSkia(
27 RenderWidgetHost* widget,
28 const gfx::Size& size);
29
26 virtual ~BackingStoreSkia(); 30 virtual ~BackingStoreSkia();
27 31
28 void SkiaShowRect(const gfx::Point& point, gfx::Canvas* canvas); 32 CONTENT_EXPORT void SkiaShowRect(const gfx::Point& point,
33 gfx::Canvas* canvas);
29 34
30 // BackingStore implementation. 35 // BackingStore implementation.
31 virtual size_t MemorySize(); 36 virtual size_t MemorySize();
32 virtual void PaintToBackingStore( 37 virtual void PaintToBackingStore(
33 RenderProcessHost* process, 38 RenderProcessHost* process,
34 TransportDIB::Id bitmap, 39 TransportDIB::Id bitmap,
35 const gfx::Rect& bitmap_rect, 40 const gfx::Rect& bitmap_rect,
36 const std::vector<gfx::Rect>& copy_rects); 41 const std::vector<gfx::Rect>& copy_rects);
37 virtual bool CopyFromBackingStore(const gfx::Rect& rect, 42 virtual bool CopyFromBackingStore(const gfx::Rect& rect,
38 skia::PlatformCanvas* output); 43 skia::PlatformCanvas* output);
39 virtual void ScrollBackingStore(int dx, int dy, 44 virtual void ScrollBackingStore(int dx, int dy,
40 const gfx::Rect& clip_rect, 45 const gfx::Rect& clip_rect,
41 const gfx::Size& view_size); 46 const gfx::Size& view_size);
42 47
43 private: 48 private:
44 SkBitmap bitmap_; 49 SkBitmap bitmap_;
45 50
46 scoped_ptr<SkCanvas> canvas_; 51 scoped_ptr<SkCanvas> canvas_;
47 52
48 DISALLOW_COPY_AND_ASSIGN(BackingStoreSkia); 53 DISALLOW_COPY_AND_ASSIGN(BackingStoreSkia);
49 }; 54 };
50 55
51 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_SKIA_H_ 56 #endif // CONTENT_BROWSER_RENDERER_HOST_BACKING_STORE_SKIA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698