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

Side by Side Diff: src/views/sdl/SkOSWindow_SDL.cpp

Issue 1919993002: Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel buffer on Windows. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 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
« no previous file with comments | « src/views/mac/SkOSWindow_Mac.mm ('k') | src/views/unix/SkOSWindow_Unix.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "SkOSWindow_SDL.h" 7 #include "SkOSWindow_SDL.h"
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 9
10 #if defined(SK_BUILD_FOR_ANDROID) 10 #if defined(SK_BUILD_FOR_ANDROID)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return nullptr; 50 return nullptr;
51 } 51 }
52 52
53 void SkOSWindow::release() { 53 void SkOSWindow::release() {
54 if (fGLContext) { 54 if (fGLContext) {
55 SDL_GL_DeleteContext(fGLContext); 55 SDL_GL_DeleteContext(fGLContext);
56 fGLContext = nullptr; 56 fGLContext = nullptr;
57 } 57 }
58 } 58 }
59 59
60 bool SkOSWindow::attach(SkBackEndTypes attachType, int msaaSampleCount, Attachme ntInfo* info) { 60 bool SkOSWindow::attach(SkBackEndTypes attachType, int msaaSampleCount, bool dee pColor,
61 AttachmentInfo* info) {
61 this->createWindow(msaaSampleCount); 62 this->createWindow(msaaSampleCount);
62 if (!fWindow) { 63 if (!fWindow) {
63 return false; 64 return false;
64 } 65 }
65 if (!fGLContext) { 66 if (!fGLContext) {
66 fGLContext = SDL_GL_CreateContext(fWindow); 67 fGLContext = SDL_GL_CreateContext(fWindow);
67 if (!fGLContext) { 68 if (!fGLContext) {
68 report_sdl_error("Failed to create SDL GL context."); 69 report_sdl_error("Failed to create SDL GL context.");
69 return false; 70 return false;
70 } 71 }
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 392
392 SkOSWindow::RunEventLoop(); 393 SkOSWindow::RunEventLoop();
393 394
394 delete window; 395 delete window;
395 application_term(); 396 application_term();
396 397
397 SDL_Quit(); 398 SDL_Quit();
398 399
399 return 0; 400 return 0;
400 } 401 }
OLDNEW
« no previous file with comments | « src/views/mac/SkOSWindow_Mac.mm ('k') | src/views/unix/SkOSWindow_Unix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698