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

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

Issue 16304003: Unified OutputSurface::SwapBuffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to 205473 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_
6 #define CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_ 6 #define CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "cc/resources/transferable_resource.h" 10 #include "cc/resources/transferable_resource.h"
(...skipping 11 matching lines...) Expand all
22 // This class can be created only on the main thread, but then becomes pinned 22 // This class can be created only on the main thread, but then becomes pinned
23 // to a fixed thread when bindToClient is called. 23 // to a fixed thread when bindToClient is called.
24 class MailboxOutputSurface : public CompositorOutputSurface { 24 class MailboxOutputSurface : public CompositorOutputSurface {
25 public: 25 public:
26 MailboxOutputSurface(int32 routing_id, 26 MailboxOutputSurface(int32 routing_id,
27 WebGraphicsContext3DCommandBufferImpl* context3d, 27 WebGraphicsContext3DCommandBufferImpl* context3d,
28 cc::SoftwareOutputDevice* software); 28 cc::SoftwareOutputDevice* software);
29 virtual ~MailboxOutputSurface(); 29 virtual ~MailboxOutputSurface();
30 30
31 // cc::OutputSurface implementation. 31 // cc::OutputSurface implementation.
32 virtual void SendFrameToParentCompositor(cc::CompositorFrame* frame) OVERRIDE;
33 virtual void EnsureBackbuffer() OVERRIDE; 32 virtual void EnsureBackbuffer() OVERRIDE;
34 virtual void DiscardBackbuffer() OVERRIDE; 33 virtual void DiscardBackbuffer() OVERRIDE;
35 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE; 34 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE;
36 virtual void BindFramebuffer() OVERRIDE; 35 virtual void BindFramebuffer() OVERRIDE;
37 virtual void PostSubBuffer(gfx::Rect rect, const ui::LatencyInfo&) OVERRIDE; 36 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE;
38 virtual void SwapBuffers(const ui::LatencyInfo&) OVERRIDE;
39 37
40 private: 38 private:
41 // CompositorOutputSurface overrides. 39 // CompositorOutputSurface overrides.
42 virtual void OnSwapAck(const cc::CompositorFrameAck& ack) OVERRIDE; 40 virtual void OnSwapAck(const cc::CompositorFrameAck& ack) OVERRIDE;
43 41
44 size_t GetNumAcksPending(); 42 size_t GetNumAcksPending();
45 43
46 struct TransferableFrame { 44 struct TransferableFrame {
47 TransferableFrame() : texture_id(0), sync_point(0) {} 45 TransferableFrame() : texture_id(0), sync_point(0) {}
48 46
(...skipping 12 matching lines...) Expand all
61 std::deque<TransferableFrame> pending_textures_; 59 std::deque<TransferableFrame> pending_textures_;
62 std::queue<TransferableFrame> returned_textures_; 60 std::queue<TransferableFrame> returned_textures_;
63 61
64 uint32 fbo_; 62 uint32 fbo_;
65 bool is_backbuffer_discarded_; 63 bool is_backbuffer_discarded_;
66 }; 64 };
67 65
68 } // namespace content 66 } // namespace content
69 67
70 #endif // CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_ 68 #endif // CONTENT_RENDERER_GPU_MAILBOX_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/delegated_compositor_output_surface.cc ('k') | content/renderer/gpu/mailbox_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698