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

Unified Diff: cc/test/fake_output_surface.cc

Issue 2089753003: cc: Use the correct internal format for glCopyTexImage2D calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: copytextureformat: comments Created 4 years, 6 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/pixel_test_delegating_output_surface.h » ('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 23b2eda51bef30402221bf57968a70a4e7f572f5..3408964ff5708586ee7c6dec89beda6a648f2a08 100644
--- a/cc/test/fake_output_surface.cc
+++ b/cc/test/fake_output_surface.cc
@@ -38,13 +38,7 @@ FakeOutputSurface::FakeOutputSurface(
bool delegated_rendering)
: OutputSurface(std::move(context_provider),
std::move(worker_context_provider),
- std::move(software_device)),
- client_(NULL),
- num_sent_frames_(0),
- has_external_stencil_test_(false),
- suspended_for_recycle_(false),
- framebuffer_(0),
- overlay_candidate_validator_(nullptr) {
+ std::move(software_device)) {
capabilities_.delegated_rendering = delegated_rendering;
}
@@ -72,11 +66,19 @@ void FakeOutputSurface::SwapBuffers(CompositorFrame* frame) {
}
void FakeOutputSurface::BindFramebuffer() {
- if (framebuffer_)
+ if (framebuffer_) {
context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER,
framebuffer_);
- else
+ } else {
OutputSurface::BindFramebuffer();
+ }
+}
+
+uint32_t FakeOutputSurface::GetFramebufferCopyTextureFormat() {
+ if (framebuffer_)
+ return framebuffer_format_;
+ else
+ return GL_RGB;
}
bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/pixel_test_delegating_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698