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

Side by Side Diff: content/common/gpu/image_transport_surface_win.cc

Issue 10690168: Aura: Resize locks with --ui-enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OSX compile fix. Created 8 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
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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "content/common/gpu/image_transport_surface.h" 7 #include "content/common/gpu/image_transport_surface.h"
8 8
9 // Out of order because it has conflicts with other includes on Windows. 9 // Out of order because it has conflicts with other includes on Windows.
10 #include "third_party/angle/include/EGL/egl.h" 10 #include "third_party/angle/include/EGL/egl.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual bool DeferDraws() OVERRIDE; 43 virtual bool DeferDraws() OVERRIDE;
44 virtual bool IsOffscreen() OVERRIDE; 44 virtual bool IsOffscreen() OVERRIDE;
45 virtual bool SwapBuffers() OVERRIDE; 45 virtual bool SwapBuffers() OVERRIDE;
46 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; 46 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
47 virtual std::string GetExtensions() OVERRIDE; 47 virtual std::string GetExtensions() OVERRIDE;
48 virtual void SetBackbufferAllocation(bool allocated) OVERRIDE; 48 virtual void SetBackbufferAllocation(bool allocated) OVERRIDE;
49 virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE; 49 virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE;
50 50
51 protected: 51 protected:
52 // ImageTransportSurface implementation 52 // ImageTransportSurface implementation
53 virtual void OnBufferPresented(uint32 sync_point) OVERRIDE; 53 virtual void OnBufferPresented(bool presented, uint32 sync_point) OVERRIDE;
54 virtual void OnResizeViewACK() OVERRIDE; 54 virtual void OnResizeViewACK() OVERRIDE;
55 virtual void OnResize(gfx::Size size) OVERRIDE; 55 virtual void OnResize(gfx::Size size) OVERRIDE;
56 virtual gfx::Size GetSize() OVERRIDE; 56 virtual gfx::Size GetSize() OVERRIDE;
57 57
58 private: 58 private:
59 virtual ~PbufferImageTransportSurface(); 59 virtual ~PbufferImageTransportSurface();
60 void SendBuffersSwapped(); 60 void SendBuffersSwapped();
61 void DestroySurface(); 61 void DestroySurface();
62 62
63 // Tracks the current buffer allocation state. 63 // Tracks the current buffer allocation state.
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params; 198 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params;
199 params.surface_handle = reinterpret_cast<int64>(GetShareHandle()); 199 params.surface_handle = reinterpret_cast<int64>(GetShareHandle());
200 CHECK(params.surface_handle); 200 CHECK(params.surface_handle);
201 201
202 helper_->SendAcceleratedSurfaceBuffersSwapped(params); 202 helper_->SendAcceleratedSurfaceBuffersSwapped(params);
203 203
204 DCHECK(!is_swap_buffers_pending_); 204 DCHECK(!is_swap_buffers_pending_);
205 is_swap_buffers_pending_ = true; 205 is_swap_buffers_pending_ = true;
206 } 206 }
207 207
208 void PbufferImageTransportSurface::OnBufferPresented(uint32 sync_point) { 208 void PbufferImageTransportSurface::OnBufferPresented(bool presented,
209 uint32 sync_point) {
209 is_swap_buffers_pending_ = false; 210 is_swap_buffers_pending_ = false;
210 if (did_unschedule_) { 211 if (did_unschedule_) {
211 did_unschedule_ = false; 212 did_unschedule_ = false;
212 helper_->SetScheduled(true); 213 helper_->SetScheduled(true);
213 } 214 }
214 } 215 }
215 216
216 void PbufferImageTransportSurface::OnResizeViewACK() { 217 void PbufferImageTransportSurface::OnResizeViewACK() {
217 NOTREACHED(); 218 NOTREACHED();
218 } 219 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 283
283 if (surface->Initialize()) 284 if (surface->Initialize())
284 return surface; 285 return surface;
285 else 286 else
286 return NULL; 287 return NULL;
287 } 288 }
288 289
289 } // namespace content 290 } // namespace content
290 291
291 #endif // ENABLE_GPU 292 #endif // ENABLE_GPU
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface_mac.cc ('k') | content/common/gpu/texture_image_transport_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698