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

Side by Side Diff: sky/shell/ios/sky_surface.mm

Issue 1229093002: [Sky] Fix iOS build breaks (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 | « sky/shell/BUILD.gn ('k') | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #import "sky_surface.h" 5 #import "sky_surface.h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 #import <OpenGLES/EAGL.h> 8 #import <OpenGLES/EAGL.h>
9 #import <OpenGLES/EAGLDrawable.h> 9 #import <OpenGLES/EAGLDrawable.h>
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 - (void)layoutSubviews { 79 - (void)layoutSubviews {
80 [super layoutSubviews]; 80 [super layoutSubviews];
81 81
82 [self configureLayerDefaults]; 82 [self configureLayerDefaults];
83 83
84 [self setupPlatformViewIfNecessary]; 84 [self setupPlatformViewIfNecessary];
85 85
86 CGSize size = self.bounds.size; 86 CGSize size = self.bounds.size;
87 CGFloat scale = [UIScreen mainScreen].scale; 87 CGFloat scale = [UIScreen mainScreen].scale;
88 88
89 ViewportMetricsPtr metrics = ViewportMetrics::New(); 89 sky::ViewportMetricsPtr metrics = sky::ViewportMetrics::New();
90 metrics->physical_width = size.width * scale; 90 metrics->physical_width = size.width * scale;
91 metrics->physical_height = size.height * scale; 91 metrics->physical_height = size.height * scale;
92 metrics->device_pixel_ratio = scale; 92 metrics->device_pixel_ratio = scale;
93 _sky_engine->OnViewportMetricsChanged(metrics.Pass()); 93 _sky_engine->OnViewportMetricsChanged(metrics.Pass());
94 } 94 }
95 95
96 - (void)configureLayerDefaults { 96 - (void)configureLayerDefaults {
97 CAEAGLLayer* layer = reinterpret_cast<CAEAGLLayer*>(self.layer); 97 CAEAGLLayer* layer = reinterpret_cast<CAEAGLLayer*>(self.layer);
98 layer.allowsGroupOpacity = YES; 98 layer.allowsGroupOpacity = YES;
99 layer.opaque = YES; 99 layer.opaque = YES;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 + (Class)layerClass { 289 + (Class)layerClass {
290 return [CAEAGLLayer class]; 290 return [CAEAGLLayer class];
291 } 291 }
292 292
293 - (void)dealloc { 293 - (void)dealloc {
294 [self notifySurfaceDestruction]; 294 [self notifySurfaceDestruction];
295 [super dealloc]; 295 [super dealloc];
296 } 296 }
297 297
298 @end 298 @end
OLDNEW
« no previous file with comments | « sky/shell/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698