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

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

Issue 251843002: ozone: dri: Remove CHECK failure on page flip failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: semicolons Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 <drm.h> 7 #include <drm.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <xf86drm.h> 9 #include <xf86drm.h>
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // The DriSurface is double buffered, so the current back buffer is 109 // The DriSurface is double buffered, so the current back buffer is
110 // missing the previous update. Expand damage region. 110 // missing the previous update. Expand damage region.
111 SkRect real_damage = RectToSkRect(UnionRects(damage, last_damage_)); 111 SkRect real_damage = RectToSkRect(UnionRects(damage, last_damage_));
112 112
113 // Copy damage region. 113 // Copy damage region.
114 skia::RefPtr<SkImage> image = skia::AdoptRef(surface_->newImageSnapshot()); 114 skia::RefPtr<SkImage> image = skia::AdoptRef(surface_->newImageSnapshot());
115 image->draw(canvas, &real_damage, real_damage, NULL); 115 image->draw(canvas, &real_damage, real_damage, NULL);
116 116
117 last_damage_ = damage; 117 last_damage_ = damage;
118 CHECK(dri_->SchedulePageFlip(widget_)); 118 dri_->SchedulePageFlip(widget_);
119 } 119 }
120 120
121 scoped_ptr<gfx::VSyncProvider> DriSurfaceAdapter::CreateVSyncProvider() { 121 scoped_ptr<gfx::VSyncProvider> DriSurfaceAdapter::CreateVSyncProvider() {
122 return dri_->CreateVSyncProvider(widget_); 122 return dri_->CreateVSyncProvider(widget_);
123 } 123 }
124 124
125 } // namespace 125 } // namespace
126 126
127 // static 127 // static
128 const gfx::AcceleratedWidget DriSurfaceFactory::kDefaultWidgetHandle = 1; 128 const gfx::AcceleratedWidget DriSurfaceFactory::kDefaultWidgetHandle = 1;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 372
373 HardwareDisplayController* DriSurfaceFactory::GetControllerForWidget( 373 HardwareDisplayController* DriSurfaceFactory::GetControllerForWidget(
374 gfx::AcceleratedWidget w) { 374 gfx::AcceleratedWidget w) {
375 CHECK_GE(w, 1); 375 CHECK_GE(w, 1);
376 CHECK_LE(static_cast<size_t>(w), controllers_.size()); 376 CHECK_LE(static_cast<size_t>(w), controllers_.size());
377 377
378 return controllers_[w - 1]; 378 return controllers_[w - 1];
379 } 379 }
380 380
381 } // namespace ui 381 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698