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

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

Issue 57883007: Adding support for VSyncProvider to the software drawing path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Compositor constructor call Created 7 years, 1 month 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
« no previous file with comments | « no previous file | cc/output/software_output_device.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
10 #include "skia/ext/refptr.h" 11 #include "skia/ext/refptr.h"
11 // TODO(robertphillips): change this to "class SkBaseDevice;" 12 // TODO(robertphillips): change this to "class SkBaseDevice;"
12 #include "third_party/skia/include/core/SkDevice.h" 13 #include "third_party/skia/include/core/SkDevice.h"
13 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
14 #include "ui/gfx/size.h" 15 #include "ui/gfx/size.h"
15 #include "ui/gfx/vector2d.h" 16 #include "ui/gfx/vector2d.h"
16 17
17 class SkBitmap; 18 class SkBitmap;
18 class SkCanvas; 19 class SkCanvas;
19 20
21 namespace gfx {
22 class VSyncProvider;
23 }
24
20 namespace cc { 25 namespace cc {
21 26
22 class SoftwareFrameData; 27 class SoftwareFrameData;
23 28
24 // This is a "tear-off" class providing software drawing support to 29 // This is a "tear-off" class providing software drawing support to
25 // OutputSurface, such as to a platform-provided window framebuffer. 30 // OutputSurface, such as to a platform-provided window framebuffer.
26 class CC_EXPORT SoftwareOutputDevice { 31 class CC_EXPORT SoftwareOutputDevice {
27 public: 32 public:
28 SoftwareOutputDevice(); 33 SoftwareOutputDevice();
29 virtual ~SoftwareOutputDevice(); 34 virtual ~SoftwareOutputDevice();
(...skipping 28 matching lines...) Expand all
58 63
59 // Ensures that there is a backing buffer available on this instance. 64 // Ensures that there is a backing buffer available on this instance.
60 virtual void EnsureBackbuffer() {} 65 virtual void EnsureBackbuffer() {}
61 66
62 // TODO(skaslev) Remove this after UberCompositor lands. 67 // TODO(skaslev) Remove this after UberCompositor lands.
63 // Called in response to receiving a SwapBuffersAck. At this point, software 68 // Called in response to receiving a SwapBuffersAck. At this point, software
64 // frame identified by id can be reused or discarded as it is no longer being 69 // frame identified by id can be reused or discarded as it is no longer being
65 // displayed. 70 // displayed.
66 virtual void ReclaimSoftwareFrame(unsigned id); 71 virtual void ReclaimSoftwareFrame(unsigned id);
67 72
73 // VSyncProvider used to update the timer used to schedule draws with the
74 // hardware vsync. Return NULL if a provider doesn't exist.
75 virtual gfx::VSyncProvider* GetVSyncProvider();
76
68 protected: 77 protected:
69 gfx::Size viewport_size_; 78 gfx::Size viewport_size_;
70 gfx::Rect damage_rect_; 79 gfx::Rect damage_rect_;
71 skia::RefPtr<SkBaseDevice> device_; 80 skia::RefPtr<SkBaseDevice> device_;
72 skia::RefPtr<SkCanvas> canvas_; 81 skia::RefPtr<SkCanvas> canvas_;
82 scoped_ptr<gfx::VSyncProvider> vsync_provider_;
73 83
74 private: 84 private:
75 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice); 85 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice);
76 }; 86 };
77 87
78 } // namespace cc 88 } // namespace cc
79 89
80 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_ 90 #endif // CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/software_output_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698