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

Unified Diff: sky/shell/gpu/rasterizer.cc

Issue 1183213007: Fix offscreen rendering on iOS by not assuming that the default window bound framebuffer is 0 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
Index: sky/shell/gpu/rasterizer.cc
diff --git a/sky/shell/gpu/rasterizer.cc b/sky/shell/gpu/rasterizer.cc
index cb56a054a45c903b721e0366c10dff1113763ba8..cd22c560f23ff701d7b9155e5fb3349af26e3539 100644
--- a/sky/shell/gpu/rasterizer.cc
+++ b/sky/shell/gpu/rasterizer.cc
@@ -54,7 +54,7 @@ void Rasterizer::Draw(skia::RefPtr<SkPicture> picture) {
EnsureGLContext();
CHECK(context_->MakeCurrent(surface_.get()));
- EnsureGaneshSurface(size);
+ EnsureGaneshSurface(surface_->GetBackingFrameBufferObject(), size);
DrawPicture(picture.get());
surface_->SwapBuffers();
@@ -84,9 +84,11 @@ void Rasterizer::EnsureGLContext() {
ganesh_context_.reset(new GaneshContext(context_.get()));
}
-void Rasterizer::EnsureGaneshSurface(const gfx::Size& size) {
+void Rasterizer::EnsureGaneshSurface(intptr_t window_fbo,
+ const gfx::Size& size) {
if (!ganesh_surface_ || ganesh_surface_->size() != size)
- ganesh_surface_.reset(new GaneshSurface(ganesh_context_.get(), size));
+ ganesh_surface_.reset(
+ new GaneshSurface(window_fbo, ganesh_context_.get(), size));
}
} // namespace shell
« no previous file with comments | « sky/shell/gpu/rasterizer.h ('k') | ui/gl/gl_surface_ios.h » ('j') | ui/gl/gl_surface_ios.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698