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

Unified Diff: cc/test/fake_output_surface.cc

Issue 20185002: ContextProvider in OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: contextprovider: don't access Context3d() in OutputSurface contructors, it's not bound yet Created 7 years, 4 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/test/fake_output_surface.h ('k') | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_output_surface.cc
diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
index 9ae75529af8c0f4bc090942a772a51725136af99..32367fd05a292cb7d1055c13b4fbb141c9a852d2 100644
--- a/cc/test/fake_output_surface.cc
+++ b/cc/test/fake_output_surface.cc
@@ -13,9 +13,9 @@
namespace cc {
FakeOutputSurface::FakeOutputSurface(
- scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
+ scoped_refptr<ContextProvider> context_provider,
bool delegated_rendering)
- : OutputSurface(context3d.Pass()),
+ : OutputSurface(context_provider),
client_(NULL),
num_sent_frames_(0),
needs_begin_frame_(false),
@@ -41,10 +41,10 @@ FakeOutputSurface::FakeOutputSurface(
}
FakeOutputSurface::FakeOutputSurface(
- scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
+ scoped_refptr<ContextProvider> context_provider,
scoped_ptr<SoftwareOutputDevice> software_device,
bool delegated_rendering)
- : OutputSurface(context3d.Pass(), software_device.Pass()),
+ : OutputSurface(context_provider, software_device.Pass()),
client_(NULL),
num_sent_frames_(0),
forced_draw_to_software_device_(false),
@@ -59,7 +59,7 @@ FakeOutputSurface::~FakeOutputSurface() {}
void FakeOutputSurface::SwapBuffers(CompositorFrame* frame) {
if (frame->software_frame_data || frame->delegated_frame_data ||
- !context3d()) {
+ !context_provider()) {
frame->AssignTo(&last_sent_frame_);
if (last_sent_frame_.delegated_frame_data) {
@@ -111,13 +111,6 @@ bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
}
}
-bool FakeOutputSurface::SetAndInitializeContext3D(
- scoped_ptr<WebKit::WebGraphicsContext3D> context3d) {
- context3d_.reset();
- return InitializeAndSetContext3D(context3d.Pass(),
- scoped_refptr<ContextProvider>());
-}
-
void FakeOutputSurface::SetTreeActivationCallback(
const base::Closure& callback) {
DCHECK(client_);
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698