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

Side by Side Diff: content/common/gpu/image_transport_surface.h

Issue 10052018: Drop frontbuffers with ui-use-gpu-process, synchronized with browser, decoupled from backbuffer dro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Major simplification! Created 8 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_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
7 #pragma once 7 #pragma once
8 8
9 #if defined(ENABLE_GPU) 9 #if defined(ENABLE_GPU)
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 public: 60 public:
61 ImageTransportSurface(); 61 ImageTransportSurface();
62 virtual ~ImageTransportSurface(); 62 virtual ~ImageTransportSurface();
63 63
64 virtual void OnNewSurfaceACK( 64 virtual void OnNewSurfaceACK(
65 uint64 surface_id, TransportDIB::Handle surface_handle) = 0; 65 uint64 surface_id, TransportDIB::Handle surface_handle) = 0;
66 virtual void OnBuffersSwappedACK() = 0; 66 virtual void OnBuffersSwappedACK() = 0;
67 virtual void OnPostSubBufferACK() = 0; 67 virtual void OnPostSubBufferACK() = 0;
68 virtual void OnResizeViewACK() = 0; 68 virtual void OnResizeViewACK() = 0;
69 virtual void OnResize(gfx::Size size) = 0; 69 virtual void OnResize(gfx::Size size) = 0;
70 virtual void OnSetFrontSurfaceIsProtected(bool is_protected) { };
70 71
71 // Creates the appropriate surface depending on the GL implementation. 72 // Creates the appropriate surface depending on the GL implementation.
72 static scoped_refptr<gfx::GLSurface> 73 static scoped_refptr<gfx::GLSurface>
73 CreateSurface(GpuChannelManager* manager, 74 CreateSurface(GpuChannelManager* manager,
74 GpuCommandBufferStub* stub, 75 GpuCommandBufferStub* stub,
75 const gfx::GLSurfaceHandle& handle); 76 const gfx::GLSurfaceHandle& handle);
76 protected: 77 protected:
77 // Used by certain implements of PostSubBuffer to determine 78 // Used by certain implements of PostSubBuffer to determine
78 // how much needs to be copied between frames. 79 // how much needs to be copied between frames.
79 void GetRegionsToCopy(const gfx::Rect& previous_damage_rect, 80 void GetRegionsToCopy(const gfx::Rect& previous_damage_rect,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 132
132 private: 133 private:
133 gpu::GpuScheduler* Scheduler(); 134 gpu::GpuScheduler* Scheduler();
134 gpu::gles2::GLES2Decoder* Decoder(); 135 gpu::gles2::GLES2Decoder* Decoder();
135 136
136 // IPC::Message handlers. 137 // IPC::Message handlers.
137 void OnNewSurfaceACK(uint64 surface_handle, TransportDIB::Handle shm_handle); 138 void OnNewSurfaceACK(uint64 surface_handle, TransportDIB::Handle shm_handle);
138 void OnBuffersSwappedACK(); 139 void OnBuffersSwappedACK();
139 void OnPostSubBufferACK(); 140 void OnPostSubBufferACK();
140 void OnResizeViewACK(); 141 void OnResizeViewACK();
142 void OnSetFrontSurfaceIsProtected(bool is_protected);
141 143
142 // Backbuffer resize callback. 144 // Backbuffer resize callback.
143 void Resize(gfx::Size size); 145 void Resize(gfx::Size size);
144 146
145 // Weak pointers that point to objects that outlive this helper. 147 // Weak pointers that point to objects that outlive this helper.
146 ImageTransportSurface* surface_; 148 ImageTransportSurface* surface_;
147 GpuChannelManager* manager_; 149 GpuChannelManager* manager_;
148 150
149 base::WeakPtr<GpuCommandBufferStub> stub_; 151 base::WeakPtr<GpuCommandBufferStub> stub_;
150 int32 route_id_; 152 int32 route_id_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 gfx::Size new_size_; 189 gfx::Size new_size_;
188 bool transport_; 190 bool transport_;
189 bool did_set_swap_interval_; 191 bool did_set_swap_interval_;
190 192
191 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); 193 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface);
192 }; 194 };
193 195
194 #endif // defined(ENABLE_GPU) 196 #endif // defined(ENABLE_GPU)
195 197
196 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 198 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698