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

Side by Side Diff: ui/compositor/compositor.cc

Issue 11194042: Implement TextureImageTransportSurface using texture mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased, fixed post sub buffer, use multiple mailbox names 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 #include "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 context->makeContextCurrent(); 183 context->makeContextCurrent();
184 gfx::GLContext* gl_context = gfx::GLContext::GetCurrent(); 184 gfx::GLContext* gl_context = gfx::GLContext::GetCurrent();
185 bool vsync = !command_line->HasSwitch(switches::kDisableGpuVsync); 185 bool vsync = !command_line->HasSwitch(switches::kDisableGpuVsync);
186 gl_context->SetSwapInterval(vsync ? 1 : 0); 186 gl_context->SetSwapInterval(vsync ? 1 : 0);
187 gl_context->ReleaseCurrent(NULL); 187 gl_context->ReleaseCurrent(NULL);
188 } 188 }
189 return context; 189 return context;
190 } 190 }
191 191
192 Texture::Texture(bool flipped, const gfx::Size& size, float device_scale_factor) 192 Texture::Texture(bool flipped, const gfx::Size& size, float device_scale_factor)
193 : flipped_(flipped), 193 : size_(size),
194 size_(size), 194 flipped_(flipped),
195 device_scale_factor_(device_scale_factor) { 195 device_scale_factor_(device_scale_factor) {
196 } 196 }
197 197
198 Texture::~Texture() { 198 Texture::~Texture() {
199 } 199 }
200 200
201 CompositorLock::CompositorLock(Compositor* compositor) 201 CompositorLock::CompositorLock(Compositor* compositor)
202 : compositor_(compositor) { 202 : compositor_(compositor) {
203 MessageLoop::current()->PostDelayedTask( 203 MessageLoop::current()->PostDelayedTask(
204 FROM_HERE, 204 FROM_HERE,
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 576
577 COMPOSITOR_EXPORT void DisableTestCompositor() { 577 COMPOSITOR_EXPORT void DisableTestCompositor() {
578 test_compositor_enabled = false; 578 test_compositor_enabled = false;
579 } 579 }
580 580
581 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { 581 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() {
582 return test_compositor_enabled; 582 return test_compositor_enabled;
583 } 583 }
584 584
585 } // namespace ui 585 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698