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

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

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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) 2013 The Chromium Authors. All rights reserved. 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 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_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_ 5 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_
6 #define CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_ 6 #define CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 10 matching lines...) Expand all
21 // to a fixed thread when BindToClient is called. 21 // to a fixed thread when BindToClient is called.
22 class CompositorSoftwareOutputDevice 22 class CompositorSoftwareOutputDevice
23 : NON_EXPORTED_BASE(public cc::SoftwareOutputDevice), 23 : NON_EXPORTED_BASE(public cc::SoftwareOutputDevice),
24 NON_EXPORTED_BASE(public base::NonThreadSafe) { 24 NON_EXPORTED_BASE(public base::NonThreadSafe) {
25 public: 25 public:
26 CompositorSoftwareOutputDevice(); 26 CompositorSoftwareOutputDevice();
27 virtual ~CompositorSoftwareOutputDevice(); 27 virtual ~CompositorSoftwareOutputDevice();
28 28
29 virtual void Resize(gfx::Size size) OVERRIDE; 29 virtual void Resize(gfx::Size size) OVERRIDE;
30 30
31 virtual SkCanvas* BeginPaint(gfx::Rect damage_rect) OVERRIDE; 31 virtual SkCanvas* BeginPaint(const gfx::Rect& damage_rect) OVERRIDE;
32 virtual void EndPaint(cc::SoftwareFrameData* frame_data) OVERRIDE; 32 virtual void EndPaint(cc::SoftwareFrameData* frame_data) OVERRIDE;
33 virtual void EnsureBackbuffer() OVERRIDE; 33 virtual void EnsureBackbuffer() OVERRIDE;
34 virtual void DiscardBackbuffer() OVERRIDE; 34 virtual void DiscardBackbuffer() OVERRIDE;
35 35
36 virtual void ReclaimSoftwareFrame(unsigned id) OVERRIDE; 36 virtual void ReclaimSoftwareFrame(unsigned id) OVERRIDE;
37 37
38 private: 38 private:
39 // Internal buffer class that manages shared memory lifetime and ownership. 39 // Internal buffer class that manages shared memory lifetime and ownership.
40 // It also tracks buffers' history so we can calculate what's the minimum 40 // It also tracks buffers' history so we can calculate what's the minimum
41 // damage rect difference between any two given buffers (see SetParent and 41 // damage rect difference between any two given buffers (see SetParent and
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 unsigned next_buffer_id_; 89 unsigned next_buffer_id_;
90 ScopedVector<Buffer> buffers_; 90 ScopedVector<Buffer> buffers_;
91 ScopedVector<Buffer> awaiting_ack_; 91 ScopedVector<Buffer> awaiting_ack_;
92 SkBitmap bitmap_; 92 SkBitmap bitmap_;
93 RenderThread* render_thread_; 93 RenderThread* render_thread_;
94 }; 94 };
95 95
96 } // namespace content 96 } // namespace content
97 97
98 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_ 98 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_H_
OLDNEW
« no previous file with comments | « content/browser/aura/software_output_device_win.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