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

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

Issue 9303009: Add IPC allowing GPU process to tell browser process to temporarily drop a front buffer. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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
« no previous file with comments | « content/common/gpu/image_transport_surface.h ('k') | ui/gfx/surface/accelerated_surface_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 stub_->SetSwapInterval(); 165 stub_->SetSwapInterval();
166 } 166 }
167 167
168 bool ImageTransportHelper::MakeCurrent() { 168 bool ImageTransportHelper::MakeCurrent() {
169 gpu::gles2::GLES2Decoder* decoder = Decoder(); 169 gpu::gles2::GLES2Decoder* decoder = Decoder();
170 if (!decoder) 170 if (!decoder)
171 return false; 171 return false;
172 return decoder->MakeCurrent(); 172 return decoder->MakeCurrent();
173 } 173 }
174 174
175 void ImageTransportHelper::Suspend() {
176 manager_->Send(new GpuHostMsg_AcceleratedSurfaceSuspend(stub_->surface_id()));
177 }
178
175 gpu::GpuScheduler* ImageTransportHelper::Scheduler() { 179 gpu::GpuScheduler* ImageTransportHelper::Scheduler() {
176 if (!stub_.get()) 180 if (!stub_.get())
177 return NULL; 181 return NULL;
178 return stub_->scheduler(); 182 return stub_->scheduler();
179 } 183 }
180 184
181 gpu::gles2::GLES2Decoder* ImageTransportHelper::Decoder() { 185 gpu::gles2::GLES2Decoder* ImageTransportHelper::Decoder() {
182 if (!stub_.get()) 186 if (!stub_.get())
183 return NULL; 187 return NULL;
184 return stub_->decoder(); 188 return stub_->decoder();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 264 }
261 265
262 void PassThroughImageTransportSurface::OnResize(gfx::Size size) { 266 void PassThroughImageTransportSurface::OnResize(gfx::Size size) {
263 new_size_ = size; 267 new_size_ = size;
264 268
265 helper_->SendResizeView(size); 269 helper_->SendResizeView(size);
266 helper_->SetScheduled(false); 270 helper_->SetScheduled(false);
267 } 271 }
268 272
269 #endif // defined(ENABLE_GPU) 273 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface.h ('k') | ui/gfx/surface/accelerated_surface_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698