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

Unified Diff: ui/compositor/test/in_process_context_factory.cc

Issue 2699173002: cc: Make OutputSurfaceFrame::sub_buffer_rect optional (Closed)
Patch Set: Created 3 years, 10 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: ui/compositor/test/in_process_context_factory.cc
diff --git a/ui/compositor/test/in_process_context_factory.cc b/ui/compositor/test/in_process_context_factory.cc
index 0a5be65e9fa2348b8cd73284239acb861ecfc957..a291de0e3e76bd1f0431dc1eea3b958814d50c57 100644
--- a/ui/compositor/test/in_process_context_factory.cc
+++ b/ui/compositor/test/in_process_context_factory.cc
@@ -79,11 +79,11 @@ class DirectOutputSurface : public cc::OutputSurface {
}
void SwapBuffers(cc::OutputSurfaceFrame frame) override {
DCHECK(context_provider_.get());
- if (frame.sub_buffer_rect == gfx::Rect(frame.size)) {
- context_provider_->ContextSupport()->Swap();
- } else {
+ if (frame.sub_buffer_rect) {
context_provider_->ContextSupport()->PartialSwapBuffers(
- frame.sub_buffer_rect);
+ *frame.sub_buffer_rect);
+ } else {
+ context_provider_->ContextSupport()->Swap();
}
gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM();

Powered by Google App Engine
This is Rietveld 408576698