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

Side by Side Diff: cc/output/software_output_device.h

Issue 15001027: [Aura] Added Support for rendering software compositor frames as cc::TextureLayers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ 5 #ifndef CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_
6 #define CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ 6 #define CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "skia/ext/refptr.h" 10 #include "skia/ext/refptr.h"
11 #include "ui/gfx/rect.h" 11 #include "ui/gfx/rect.h"
12 #include "ui/gfx/size.h" 12 #include "ui/gfx/size.h"
13 #include "ui/gfx/vector2d.h" 13 #include "ui/gfx/vector2d.h"
14 #include "ui/surface/transport_dib.h"
15 14
16 class SkBitmap; 15 class SkBitmap;
17 class SkDevice; 16 class SkDevice;
18 class SkCanvas; 17 class SkCanvas;
19 18
20 namespace cc { 19 namespace cc {
21 20
22 class SoftwareFrameData; 21 class SoftwareFrameData;
23 22
24 // This is a "tear-off" class providing software drawing support to 23 // This is a "tear-off" class providing software drawing support to
25 // OutputSurface, such as to a platform-provided window framebuffer. 24 // OutputSurface, such as to a platform-provided window framebuffer.
26 class CC_EXPORT SoftwareOutputDevice { 25 class CC_EXPORT SoftwareOutputDevice {
27 public: 26 public:
28 SoftwareOutputDevice(); 27 SoftwareOutputDevice();
29 virtual ~SoftwareOutputDevice(); 28 virtual ~SoftwareOutputDevice();
30 29
31 // SoftwareOutputDevice implementation. 30 // SoftwareOutputDevice implementation.
32 virtual void Resize(gfx::Size size); 31 virtual void Resize(gfx::Size size);
33 32
34 virtual SkCanvas* BeginPaint(gfx::Rect damage_rect); 33 virtual SkCanvas* BeginPaint(gfx::Rect damage_rect);
35 virtual void EndPaint(SoftwareFrameData* frame_data); 34 virtual void EndPaint(SoftwareFrameData* frame_data);
36 35
37 virtual void CopyToBitmap(gfx::Rect rect, SkBitmap* output); 36 virtual void CopyToBitmap(gfx::Rect rect, SkBitmap* output);
38 virtual void Scroll(gfx::Vector2d delta, 37 virtual void Scroll(gfx::Vector2d delta,
39 gfx::Rect clip_rect); 38 gfx::Rect clip_rect);
40 39
41 // TODO(skaslev) Remove this after UberCompositor lands. 40 // TODO(skaslev) Remove this after UberCompositor lands.
42 virtual void ReclaimDIB(const TransportDIB::Id& id); 41 virtual void ReclaimSoftwareFrame(int id);
piman 2013/06/05 00:30:55 unsigned int.
slavi 2013/06/06 23:02:47 Done.
43 42
44 protected: 43 protected:
45 gfx::Size viewport_size_; 44 gfx::Size viewport_size_;
46 gfx::Rect damage_rect_; 45 gfx::Rect damage_rect_;
47 skia::RefPtr<SkDevice> device_; 46 skia::RefPtr<SkDevice> device_;
48 skia::RefPtr<SkCanvas> canvas_; 47 skia::RefPtr<SkCanvas> canvas_;
49 48
50 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice); 49 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice);
51 }; 50 };
52 51
53 } // namespace cc 52 } // namespace cc
54 53
55 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ 54 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698