OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 | 7 |
8 #import "SkSampleUIView.h" | 8 #import "SkSampleUIView.h" |
9 | 9 |
10 //#define SKGL_CONFIG kEAGLColorFormatRGB565 | 10 //#define SKGL_CONFIG kEAGLColorFormatRGB565 |
(...skipping 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 | 41 |
42 virtual ~SkiOSDeviceManager() { | 42 virtual ~SkiOSDeviceManager() { |
43 #if SK_SUPPORT_GPU | 43 #if SK_SUPPORT_GPU |
44 SkSafeUnref(fCurContext); | 44 SkSafeUnref(fCurContext); |
45 SkSafeUnref(fCurIntf); | 45 SkSafeUnref(fCurIntf); |
46 SkSafeUnref(fCurRenderTarget); | 46 SkSafeUnref(fCurRenderTarget); |
47 #endif | 47 #endif |
48 } | 48 } |
49 | 49 |
50 void setUpBackend(SampleWindow* win, int msaaSampleCount) override { | 50 void setUpBackend(SampleWindow* win, int msaaSampleCount, bool tenBitColor)
override { |
51 SkASSERT(SkOSWindow::kNone_BackEndType == fBackend); | 51 SkASSERT(SkOSWindow::kNone_BackEndType == fBackend); |
52 | 52 |
53 fBackend = SkOSWindow::kNone_BackEndType; | 53 fBackend = SkOSWindow::kNone_BackEndType; |
54 | 54 |
55 #if SK_SUPPORT_GPU | 55 #if SK_SUPPORT_GPU |
56 switch (win->getDeviceType()) { | 56 switch (win->getDeviceType()) { |
57 case SampleWindow::kRaster_DeviceType: | 57 case SampleWindow::kRaster_DeviceType: |
58 break; | 58 break; |
59 // these guys use the native backend | 59 // these guys use the native backend |
60 case SampleWindow::kGPU_DeviceType: | 60 case SampleWindow::kGPU_DeviceType: |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 glBindRenderbuffer(GL_RENDERBUFFER, fGL.fRenderbuffer); | 481 glBindRenderbuffer(GL_RENDERBUFFER, fGL.fRenderbuffer); |
482 glGetRenderbufferParameteriv(GL_RENDERBUFFER, | 482 glGetRenderbufferParameteriv(GL_RENDERBUFFER, |
483 GL_RENDERBUFFER_STENCIL_SIZE, | 483 GL_RENDERBUFFER_STENCIL_SIZE, |
484 &info->fStencilBits); | 484 &info->fStencilBits); |
485 glGetRenderbufferParameteriv(GL_RENDERBUFFER, | 485 glGetRenderbufferParameteriv(GL_RENDERBUFFER, |
486 GL_RENDERBUFFER_SAMPLES_APPLE, | 486 GL_RENDERBUFFER_SAMPLES_APPLE, |
487 &info->fSampleCount); | 487 &info->fSampleCount); |
488 } | 488 } |
489 | 489 |
490 @end | 490 @end |
OLD | NEW |