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

Side by Side Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 12892005: Implement client side PBOs for glReadPixel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make GLHelper constructor explicit Created 7 years, 8 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 | « no previous file | content/browser/renderer_host/image_transport_factory_android.cc » ('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 #include "content/browser/renderer_host/image_transport_factory.h" 5 #include "content/browser/renderer_host/image_transport_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 shared_contexts_main_thread_->Context3d(), 457 shared_contexts_main_thread_->Context3d(),
458 size, 458 size,
459 device_scale_factor, 459 device_scale_factor,
460 texture_id)); 460 texture_id));
461 return image; 461 return image;
462 } 462 }
463 463
464 virtual GLHelper* GetGLHelper() OVERRIDE { 464 virtual GLHelper* GetGLHelper() OVERRIDE {
465 if (!gl_helper_.get()) { 465 if (!gl_helper_.get()) {
466 CreateSharedContextLazy(); 466 CreateSharedContextLazy();
467 WebKit::WebGraphicsContext3D* context_for_main_thread = 467 WebGraphicsContext3DCommandBufferImpl* context_for_main_thread =
468 shared_contexts_main_thread_->Context3d(); 468 shared_contexts_main_thread_->Context3d();
469 WebKit::WebGraphicsContext3D* context_for_thread = 469 gl_helper_.reset(new GLHelper(context_for_main_thread));
470 CreateOffscreenContext();
471 if (!context_for_thread)
472 return NULL;
473
474 gl_helper_.reset(new GLHelper(context_for_main_thread,
475 context_for_thread));
476 } 470 }
477 return gl_helper_.get(); 471 return gl_helper_.get();
478 } 472 }
479 473
480 virtual uint32 InsertSyncPoint() OVERRIDE { 474 virtual uint32 InsertSyncPoint() OVERRIDE {
481 if (!shared_contexts_main_thread_) 475 if (!shared_contexts_main_thread_)
482 return 0; 476 return 0;
483 return shared_contexts_main_thread_->Context3d()->insertSyncPoint(); 477 return shared_contexts_main_thread_->Context3d()->insertSyncPoint();
484 } 478 }
485 479
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 delete g_factory; 760 delete g_factory;
767 g_factory = NULL; 761 g_factory = NULL;
768 } 762 }
769 763
770 // static 764 // static
771 ImageTransportFactory* ImageTransportFactory::GetInstance() { 765 ImageTransportFactory* ImageTransportFactory::GetInstance() {
772 return g_factory; 766 return g_factory;
773 } 767 }
774 768
775 } // namespace content 769 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/image_transport_factory_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698