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

Side by Side Diff: content/renderer/gpu/compositor_software_output_device.h

Issue 13255002: Implemented software output device for Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed linux builds. Created 7 years, 8 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
(Empty)
1 // Copyright (c) 2013 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_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_
6 #define CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_
7
8 #include "base/memory/scoped_vector.h"
9 #include "base/threading/non_thread_safe.h"
10 #include "cc/output/software_output_device.h"
11 #include "third_party/skia/include/core/SkBitmap.h"
12 #include "ui/surface/transport_dib.h"
13
14 namespace content {
15
16 // This class can be created only on the main thread, but then becomes pinned
17 // to a fixed thread when BindToClient is called.
18 class CompositorSoftwareOutputDevice
19 : NON_EXPORTED_BASE(public cc::SoftwareOutputDevice),
20 NON_EXPORTED_BASE(public base::NonThreadSafe) {
21 public:
22 CompositorSoftwareOutputDevice();
23 virtual ~CompositorSoftwareOutputDevice();
24
25 virtual void Resize(gfx::Size size) OVERRIDE;
26
27 virtual SkCanvas* BeginPaint(gfx::Rect damage_rect) OVERRIDE;
28 virtual void EndPaint(cc::SoftwareFrameData* frame_data) OVERRIDE;
29
30 virtual void ReclaimDIB(const TransportDIB::Id& id) OVERRIDE;
31
32 private:
33 TransportDIB* CreateDIB();
34
35 int front_buffer_;
36 int last_buffer_;
37 int num_free_buffers_;
38 ScopedVector<TransportDIB> dibs_;
39 ScopedVector<TransportDIB> awaiting_ack_;
40 SkBitmap bitmap_;
41 uint32 sequence_num_;
42 };
43
44 } // namespace content
45
46 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.cc ('k') | content/renderer/gpu/compositor_software_output_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698