diff options
author | bsalomon <bsalomon@google.com> | 2015-02-11 11:11:11 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-11 11:11:11 -0800 |
commit | bb0502eec5c66ddd2f54330711010aabfa1c2176 (patch) | |
tree | 9391a830b277a798e041911de0390cd678371d1a /samplecode | |
parent | 0ea80f43a1af05b8157a4ef387223bb5b0da35ed (diff) |
Support multiple null GL contexts on a thread.
This has the side effect of requiring SkNullGLContext to use the null GL interface.
It exposes SkNullGLContext and also removes null context support from SampleApp.
Review URL: https://codereview.chromium.org/916733002
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleApp.cpp | 19 | ||||
-rw-r--r-- | samplecode/SampleApp.h | 2 |
2 files changed, 1 insertions, 20 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index cd5793f6a3..b8e91a6840 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -188,8 +188,6 @@ public: case kPicture_DeviceType: // fallthrough case kGPU_DeviceType: - // fallthrough - case kNullGPU_DeviceType: // all these guys use the native backend fBackend = kNativeGL_BackEndType; break; @@ -227,9 +225,6 @@ public: glInterface.reset(GrGLCreateANGLEInterface()); break; #endif // SK_ANGLE - case kNullGPU_DeviceType: - glInterface.reset(GrGLCreateNullInterface()); - break; default: SkASSERT(false); break; @@ -680,7 +675,6 @@ static inline SampleWindow::DeviceType cycle_devicetype(SampleWindow::DeviceType #if SK_ANGLE SampleWindow::kANGLE_DeviceType, #endif // SK_ANGLE - SampleWindow::kRaster_DeviceType, // skip the null gpu device in normal cycling #endif // SK_SUPPORT_GPU SampleWindow::kRaster_DeviceType }; @@ -1258,12 +1252,7 @@ SkCanvas* SampleWindow::beforeChildren(SkCanvas* canvas) { } else if (kPicture_DeviceType == fDeviceType) { canvas = fRecorder.beginRecording(9999, 9999, NULL, 0); } else { -#if SK_SUPPORT_GPU - if (kNullGPU_DeviceType != fDeviceType) -#endif - { - canvas = this->INHERITED::beforeChildren(canvas); - } + canvas = this->INHERITED::beforeChildren(canvas); } if (fUseClip) { @@ -1724,11 +1713,6 @@ bool SampleWindow::onHandleChar(SkUnichar uni) { this->updateTitle(); return true; #if SK_SUPPORT_GPU - case '\\': - this->setDeviceType(kNullGPU_DeviceType); - this->inval(NULL); - this->updateTitle(); - return true; case 'p': { GrContext* grContext = this->getGrContext(); @@ -1961,7 +1945,6 @@ static const char* gDeviceTypePrefix[] = { #if SK_ANGLE "angle: ", #endif // SK_ANGLE - "null-gl: " #endif // SK_SUPPORT_GPU }; SK_COMPILE_ASSERT(SK_ARRAY_COUNT(gDeviceTypePrefix) == SampleWindow::kDeviceTypeCnt, diff --git a/samplecode/SampleApp.h b/samplecode/SampleApp.h index b6530a3d5f..4e2cb6fe48 100644 --- a/samplecode/SampleApp.h +++ b/samplecode/SampleApp.h @@ -38,7 +38,6 @@ public: #if SK_ANGLE kANGLE_DeviceType, #endif // SK_ANGLE - kNullGPU_DeviceType, #endif // SK_SUPPORT_GPU kDeviceTypeCnt @@ -51,7 +50,6 @@ public: #if SK_ANGLE case kANGLE_DeviceType: #endif // SK_ANGLE - case kNullGPU_DeviceType: return true; default: return false; |