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

Unified Diff: cc/test/fake_output_surface.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo 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/test/fake_output_surface.h ('k') | cc/test/fake_picture_layer_tiling_client.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 46efba09f92dd7344a4f900ce6cf4bb13e873ee7..d54d2d133d950acec3db592fa09c9c91b1d1e94b 100644
--- a/cc/test/fake_output_surface.cc
+++ b/cc/test/fake_output_surface.cc
@@ -20,7 +20,8 @@ FakeOutputSurface::FakeOutputSurface(
: OutputSurface(context_provider),
client_(NULL),
num_sent_frames_(0),
- has_external_stencil_test_(false) {
+ has_external_stencil_test_(false),
+ framebuffer_(0) {
if (delegated_rendering) {
capabilities_.delegated_rendering = true;
capabilities_.max_frames_pending = 1;
@@ -33,7 +34,8 @@ FakeOutputSurface::FakeOutputSurface(
: OutputSurface(software_device.Pass()),
client_(NULL),
num_sent_frames_(0),
- has_external_stencil_test_(false) {
+ has_external_stencil_test_(false),
+ framebuffer_(0) {
if (delegated_rendering) {
capabilities_.delegated_rendering = true;
capabilities_.max_frames_pending = 1;
@@ -47,7 +49,8 @@ FakeOutputSurface::FakeOutputSurface(
: OutputSurface(context_provider, software_device.Pass()),
client_(NULL),
num_sent_frames_(0),
- has_external_stencil_test_(false) {
+ has_external_stencil_test_(false),
+ framebuffer_(0) {
if (delegated_rendering) {
capabilities_.delegated_rendering = true;
capabilities_.max_frames_pending = 1;
@@ -78,6 +81,14 @@ void FakeOutputSurface::SwapBuffers(CompositorFrame* frame) {
client_->DidSwapBuffers();
}
+void FakeOutputSurface::BindFramebuffer() {
+ if (framebuffer_)
+ context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER,
+ framebuffer_);
+ else
+ OutputSurface::BindFramebuffer();
+}
+
bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
if (OutputSurface::BindToClient(client)) {
client_ = client;
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/fake_picture_layer_tiling_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698