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

Side by Side Diff: services/gfx/compositor/graph/scene_def.cc

Issue 1776643004: Mozart: Specify texture origin explicitly. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-3
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « mojo/ui/gl_renderer.cc ('k') | services/gfx/compositor/render/render_image.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/gfx/compositor/graph/scene_def.h" 5 #include "services/gfx/compositor/graph/scene_def.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 if (width < 1 || width > kMaxTextureWidth || height < 1 || 186 if (width < 1 || width > kMaxTextureWidth || height < 1 ||
187 height > kMaxTextureHeight) { 187 height > kMaxTextureHeight) {
188 err << "MailboxTexture resource has invalid size: " 188 err << "MailboxTexture resource has invalid size: "
189 << "resource_id=" << resource_id << ", width=" << width 189 << "resource_id=" << resource_id << ", width=" << width
190 << ", height=" << height; 190 << ", height=" << height;
191 return nullptr; 191 return nullptr;
192 } 192 }
193 const GLbyte* const mailbox_name = reinterpret_cast<GLbyte*>( 193 const GLbyte* const mailbox_name = reinterpret_cast<GLbyte*>(
194 mailbox_texture_resource_decl->mailbox_name.data()); 194 mailbox_texture_resource_decl->mailbox_name.data());
195 const GLuint sync_point = mailbox_texture_resource_decl->sync_point; 195 const GLuint sync_point = mailbox_texture_resource_decl->sync_point;
196 const mojo::gfx::composition::MailboxTextureResource::Origin origin =
197 mailbox_texture_resource_decl->origin;
196 198
197 std::shared_ptr<RenderImage> image = RenderImage::CreateFromMailboxTexture( 199 std::shared_ptr<RenderImage> image = RenderImage::CreateFromMailboxTexture(
198 mailbox_name, sync_point, width, height, 200 mailbox_name, sync_point, width, height, origin,
199 base::MessageLoop::current()->task_runner(), 201 base::MessageLoop::current()->task_runner(),
200 base::Bind( 202 base::Bind(
201 &ReleaseMailboxTexture, 203 &ReleaseMailboxTexture,
202 base::Passed( 204 base::Passed(
203 mojo::gfx::composition::MailboxTextureCallbackPtr::Create( 205 mojo::gfx::composition::MailboxTextureCallbackPtr::Create(
204 std::move(mailbox_texture_resource_decl->callback))))); 206 std::move(mailbox_texture_resource_decl->callback)))));
205 if (!image) { 207 if (!image) {
206 err << "Could not create MailboxTexture"; 208 err << "Could not create MailboxTexture";
207 return nullptr; 209 return nullptr;
208 } 210 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 310
309 SceneDef::Publication::Publication( 311 SceneDef::Publication::Publication(
310 mojo::gfx::composition::SceneMetadataPtr metadata) 312 mojo::gfx::composition::SceneMetadataPtr metadata)
311 : metadata(metadata.Pass()) { 313 : metadata(metadata.Pass()) {
312 DCHECK(this->metadata); 314 DCHECK(this->metadata);
313 } 315 }
314 316
315 SceneDef::Publication::~Publication() {} 317 SceneDef::Publication::~Publication() {}
316 318
317 } // namespace compositor 319 } // namespace compositor
OLDNEW
« no previous file with comments | « mojo/ui/gl_renderer.cc ('k') | services/gfx/compositor/render/render_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698