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

Unified Diff: content/browser/compositor/gpu_browser_compositor_output_surface.cc

Issue 2374183006: Remove GLFrameData from CompositorFrame. (Closed)
Patch Set: Rebase. Created 4 years, 2 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
Index: content/browser/compositor/gpu_browser_compositor_output_surface.cc
diff --git a/content/browser/compositor/gpu_browser_compositor_output_surface.cc b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
index ff3b2e3ce813c8bf84fa49155274c9a883ec4881..73ca19860b1c68d1c50dcc3ade78800af11aa09f 100644
--- a/content/browser/compositor/gpu_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
@@ -7,8 +7,8 @@
#include <utility>
#include "build/build_config.h"
-#include "cc/output/compositor_frame.h"
#include "cc/output/output_surface_client.h"
+#include "cc/output/output_surface_frame.h"
#include "components/display_compositor/compositor_overlay_candidate_validator.h"
#include "content/browser/compositor/reflector_impl.h"
#include "content/browser/compositor/reflector_texture.h"
@@ -85,13 +85,12 @@ void GpuBrowserCompositorOutputSurface::BindFramebuffer() {
context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0);
}
-void GpuBrowserCompositorOutputSurface::SwapBuffers(cc::CompositorFrame frame) {
- DCHECK(frame.gl_frame_data);
+void GpuBrowserCompositorOutputSurface::SwapBuffers(
+ cc::OutputSurfaceFrame frame) {
+ GetCommandBufferProxy()->SetLatencyInfo(frame.latency_info);
- GetCommandBufferProxy()->SetLatencyInfo(frame.metadata.latency_info);
-
- gfx::Rect swap_rect = frame.gl_frame_data->sub_buffer_rect;
- gfx::Size surface_size = frame.gl_frame_data->size;
+ gfx::Rect swap_rect = frame.sub_buffer_rect;
+ gfx::Size surface_size = frame.size;
if (reflector_) {
if (swap_rect == gfx::Rect(surface_size)) {
reflector_texture_->CopyTextureFullImage(surface_size);
@@ -102,7 +101,7 @@ void GpuBrowserCompositorOutputSurface::SwapBuffers(cc::CompositorFrame frame) {
}
}
- if (swap_rect == gfx::Rect(frame.gl_frame_data->size))
+ if (swap_rect == gfx::Rect(frame.size))
context_provider_->ContextSupport()->Swap();
else
context_provider_->ContextSupport()->PartialSwapBuffers(swap_rect);

Powered by Google App Engine
This is Rietveld 408576698