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

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

Issue 2374183006: Remove GLFrameData from CompositorFrame. (Closed)
Patch Set: Rebase + fix includes. 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/mus_browser_compositor_output_surface.cc
diff --git a/content/browser/compositor/mus_browser_compositor_output_surface.cc b/content/browser/compositor/mus_browser_compositor_output_surface.cc
index 82e9345069e676ddc0583e452aa87c1563fb97fc..35b6778e6049747d6a9b0f109d6bdf9c621571b0 100644
--- a/content/browser/compositor/mus_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/mus_browser_compositor_output_surface.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "cc/output/compositor_frame.h"
+#include "cc/output/output_surface_frame.h"
#include "cc/quads/render_pass.h"
#include "cc/quads/texture_draw_quad.h"
#include "components/display_compositor/compositor_overlay_candidate_validator.h"
@@ -36,10 +37,11 @@ MusBrowserCompositorOutputSurface::MusBrowserCompositorOutputSurface(
MusBrowserCompositorOutputSurface::~MusBrowserCompositorOutputSurface() {}
-void MusBrowserCompositorOutputSurface::SwapBuffers(cc::CompositorFrame frame) {
+void MusBrowserCompositorOutputSurface::SwapBuffers(
+ cc::OutputSurfaceFrame frame) {
const gfx::Rect bounds(ui_window_->bounds().size());
cc::CompositorFrame ui_frame;
- ui_frame.metadata = std::move(frame.metadata);
+ ui_frame.metadata.latency_info = frame.latency_info;
danakj 2016/10/04 21:58:40 Keep moving this? Moving a vector is much better t
kylechar 2016/10/05 13:45:54 That seems super unsafe? We pass |frame| to GpuBro
danakj 2016/10/05 23:02:19 Oh wow. It does use the latency infoes: https://cs
kylechar 2016/10/06 14:16:55 Done.
ui_frame.delegated_frame_data = base::MakeUnique<cc::DelegatedFrameData>();
const cc::RenderPassId render_pass_id(1, 1);
std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
@@ -57,11 +59,11 @@ void MusBrowserCompositorOutputSurface::SwapBuffers(cc::CompositorFrame frame) {
resource.id = AllocateResourceId();
resource.format = cc::ResourceFormat::RGBA_8888;
resource.filter = GL_LINEAR;
- resource.size = frame.gl_frame_data->size;
+ resource.size = frame.size;
const gpu::Mailbox& mailbox = GetMailboxFromResourceId(resource.id);
DCHECK(!mailbox.IsZero());
- const gfx::Rect rect(frame.gl_frame_data->size);
+ const gfx::Rect rect(frame.size);
// Call parent's SwapBuffers to generate the front buffer, and then send the
// front buffer to mus.

Powered by Google App Engine
This is Rietveld 408576698