Bug 1101160. D3D11: Make switch statement better. r=bas
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 18 Nov 2014 15:49:39 -0500
changeset 240675 841090f9e61792b711d005706ba8b74afe70f884
parent 240674 0088d5bbeecb1a931fc46da5154a4650ac0a2a0b
child 240676 406cce2749297ce10c84c916870cde4320c00cf3
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs1101160
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1101160. D3D11: Make switch statement better. r=bas This is the order one would expect.
gfx/layers/d3d11/CompositorD3D11.cpp
--- a/gfx/layers/d3d11/CompositorD3D11.cpp
+++ b/gfx/layers/d3d11/CompositorD3D11.cpp
@@ -1065,23 +1065,23 @@ CompositorD3D11::UpdateConstantBuffers()
   return true;
 }
 
 void
 CompositorD3D11::SetSamplerForFilter(Filter aFilter)
 {
   ID3D11SamplerState *sampler;
   switch (aFilter) {
+    case Filter::POINT:
+    sampler = mAttachments->mPointSamplerState;
+    break;
+  case Filter::LINEAR:
   default:
-  case Filter::LINEAR:
     sampler = mAttachments->mLinearSamplerState;
     break;
-  case Filter::POINT:
-    sampler = mAttachments->mPointSamplerState;
-    break;
   }
 
   mContext->PSSetSamplers(0, 1, &sampler);
 }
 
 void
 CompositorD3D11::PaintToTarget()
 {