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

Unified Diff: services/gfx/compositor/render/render_image.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/gfx/compositor/render/render_image.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gfx/compositor/render/render_image.cc
diff --git a/services/gfx/compositor/render/render_image.cc b/services/gfx/compositor/render/render_image.cc
index a62a289d9081419b7560e83e220d5cba833ccbc4..1d346759bd9464410bc1a8caa74a624c7a584099 100644
--- a/services/gfx/compositor/render/render_image.cc
+++ b/services/gfx/compositor/render/render_image.cc
@@ -33,8 +33,13 @@ class RenderImage::Generator : public mojo::skia::MailboxTextureImageGenerator {
const GLbyte mailbox_name[GL_MAILBOX_SIZE_CHROMIUM],
GLuint sync_point,
uint32_t width,
- uint32_t height)
- : MailboxTextureImageGenerator(mailbox_name, sync_point, width, height),
+ uint32_t height,
+ GrSurfaceOrigin origin)
+ : MailboxTextureImageGenerator(mailbox_name,
+ sync_point,
+ width,
+ height,
+ origin),
releaser_(releaser) {
DCHECK(releaser_);
}
@@ -59,12 +64,17 @@ std::shared_ptr<RenderImage> RenderImage::CreateFromMailboxTexture(
GLuint sync_point,
uint32_t width,
uint32_t height,
+ mojo::gfx::composition::MailboxTextureResource::Origin origin,
const scoped_refptr<base::TaskRunner>& task_runner,
const base::Closure& release_task) {
std::shared_ptr<Releaser> releaser =
std::make_shared<Releaser>(task_runner, release_task);
skia::RefPtr<SkImage> image = skia::AdoptRef(SkImage::NewFromGenerator(
- new Generator(releaser, mailbox_name, sync_point, width, height)));
+ new Generator(releaser, mailbox_name, sync_point, width, height,
+ origin == mojo::gfx::composition::MailboxTextureResource::
+ Origin::BOTTOM_LEFT
+ ? kBottomLeft_GrSurfaceOrigin
+ : kTopLeft_GrSurfaceOrigin)));
if (!image)
return nullptr;
« no previous file with comments | « services/gfx/compositor/render/render_image.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698