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

Side by Side Diff: ui/ozone/platform/dri/dri_surface_factory.cc

Issue 371813004: ozone: gbm: Add overlay support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test build Created 6 years, 5 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 | « ui/ozone/platform/dri/dri_surface.cc ('k') | ui/ozone/platform/dri/dri_wrapper.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/ozone/platform/dri/dri_surface_factory.h" 5 #include "ui/ozone/platform/dri/dri_surface_factory.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 viewport_size.width(), viewport_size.height(), kOpaque_SkAlphaType); 80 viewport_size.width(), viewport_size.height(), kOpaque_SkAlphaType);
81 surface_ = skia::AdoptRef(SkSurface::NewRaster(info)); 81 surface_ = skia::AdoptRef(SkSurface::NewRaster(info));
82 } 82 }
83 83
84 void DriSurfaceAdapter::PresentCanvas(const gfx::Rect& damage) { 84 void DriSurfaceAdapter::PresentCanvas(const gfx::Rect& damage) {
85 CHECK(base::MessageLoopForUI::IsCurrent()); 85 CHECK(base::MessageLoopForUI::IsCurrent());
86 if (!controller_) 86 if (!controller_)
87 return; 87 return;
88 88
89 UpdateNativeSurface(damage); 89 UpdateNativeSurface(damage);
90 controller_->SchedulePageFlip(); 90 controller_->SchedulePageFlip(std::vector<OzoneOverlayPlane>(), NULL);
91 controller_->WaitForPageFlipEvent(); 91 controller_->WaitForPageFlipEvent();
92 } 92 }
93 93
94 scoped_ptr<gfx::VSyncProvider> DriSurfaceAdapter::CreateVSyncProvider() { 94 scoped_ptr<gfx::VSyncProvider> DriSurfaceAdapter::CreateVSyncProvider() {
95 return scoped_ptr<gfx::VSyncProvider>(new DriVSyncProvider(controller_)); 95 return scoped_ptr<gfx::VSyncProvider>(new DriVSyncProvider(controller_));
96 } 96 }
97 97
98 void DriSurfaceAdapter::UpdateNativeSurface(const gfx::Rect& damage) { 98 void DriSurfaceAdapter::UpdateNativeSurface(const gfx::Rect& damage) {
99 SkCanvas* canvas = static_cast<DriSurface*>(controller_->surface()) 99 SkCanvas* canvas = static_cast<DriSurface*>(controller_->surface())
100 ->GetDrawableForWidget(); 100 ->GetDrawableForWidget();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 controller->SetCursor(cursor_surface_.get()); 234 controller->SetCursor(cursor_surface_.get());
235 } 235 }
236 } else { 236 } else {
237 // No cursor set. 237 // No cursor set.
238 if (controller) 238 if (controller)
239 controller->UnsetCursor(); 239 controller->UnsetCursor();
240 } 240 }
241 } 241 }
242 242
243 } // namespace ui 243 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_surface.cc ('k') | ui/ozone/platform/dri/dri_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698