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

Unified Diff: cc/output/output_surface.cc

Issue 889063002: (not for commit) Create 2nd ContextProvider for Ganesh rasterization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/output/output_surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.cc
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index b65887e960262262c0f514492f56a49ac0a0e7c3..e5c0713d658277f6d89d0e226f8d25faddd20482 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -21,6 +21,18 @@ OutputSurface::OutputSurface(
const scoped_refptr<ContextProvider>& context_provider)
: client_(NULL),
context_provider_(context_provider),
+ worker_context_provider_(NULL),
+ device_scale_factor_(-1),
+ external_stencil_test_enabled_(false),
+ weak_ptr_factory_(this) {
+}
+
+OutputSurface::OutputSurface(
+ const scoped_refptr<ContextProvider>& context_provider,
+ const scoped_refptr<ContextProvider>& worker_context_provider)
+ : client_(NULL),
+ context_provider_(context_provider),
+ worker_context_provider_(worker_context_provider),
device_scale_factor_(-1),
external_stencil_test_enabled_(false),
weak_ptr_factory_(this) {
@@ -36,9 +48,11 @@ OutputSurface::OutputSurface(scoped_ptr<SoftwareOutputDevice> software_device)
OutputSurface::OutputSurface(
const scoped_refptr<ContextProvider>& context_provider,
+ const scoped_refptr<ContextProvider>& worker_context_provider,
scoped_ptr<SoftwareOutputDevice> software_device)
: client_(NULL),
context_provider_(context_provider),
+ worker_context_provider_(worker_context_provider),
software_device_(software_device.Pass()),
device_scale_factor_(-1),
external_stencil_test_enabled_(false),
@@ -105,8 +119,14 @@ bool OutputSurface::BindToClient(OutputSurfaceClient* client) {
if (context_provider_.get()) {
success = context_provider_->BindToCurrentThread();
- if (success)
+ if (success) {
SetUpContext3d();
+ }
+ }
+
+ if (worker_context_provider_.get()) {
+ success = worker_context_provider_->BindToCurrentThread();
+ // TODO(vmiura): Callbacks for worker context.
}
if (!success)
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/output/output_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698