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

Side by Side Diff: ui/surface/accelerated_surface_win.cc

Issue 10843020: win: Drop extra triangles in triangle fan used to flip image transport surface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/surface/accelerated_surface_win.h" 5 #include "ui/surface/accelerated_surface_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 { halfPixelX + 1, halfPixelY - 1, 0.5f, 1, 1, 0 }, 813 { halfPixelX + 1, halfPixelY - 1, 0.5f, 1, 1, 0 },
814 { halfPixelX - 1, halfPixelY - 1, 0.5f, 1, 0, 0 } 814 { halfPixelX - 1, halfPixelY - 1, 0.5f, 1, 0, 0 }
815 }; 815 };
816 816
817 if (UsingOcclusionQuery()) { 817 if (UsingOcclusionQuery()) {
818 present_thread_->query()->Issue(D3DISSUE_BEGIN); 818 present_thread_->query()->Issue(D3DISSUE_BEGIN);
819 } 819 }
820 820
821 present_thread_->device()->BeginScene(); 821 present_thread_->device()->BeginScene();
822 present_thread_->device()->DrawPrimitiveUP(D3DPT_TRIANGLEFAN, 822 present_thread_->device()->DrawPrimitiveUP(D3DPT_TRIANGLEFAN,
823 arraysize(vertices), 823 2,
824 vertices, 824 vertices,
825 sizeof(vertices[0])); 825 sizeof(vertices[0]));
826 present_thread_->device()->EndScene(); 826 present_thread_->device()->EndScene();
827 827
828 present_thread_->device()->SetTexture(0, NULL); 828 present_thread_->device()->SetTexture(0, NULL);
829 present_thread_->device()->SetRenderTarget(0, default_render_target); 829 present_thread_->device()->SetRenderTarget(0, default_render_target);
830 default_render_target->Release(); 830 default_render_target->Release();
831 } 831 }
832 832
833 hr = present_thread_->query()->Issue(D3DISSUE_END); 833 hr = present_thread_->query()->Issue(D3DISSUE_END);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 return presenter_->CopyTo(src_subrect, dst_size, buf); 896 return presenter_->CopyTo(src_subrect, dst_size, buf);
897 } 897 }
898 898
899 void AcceleratedSurface::Suspend() { 899 void AcceleratedSurface::Suspend() {
900 presenter_->Suspend(); 900 presenter_->Suspend();
901 } 901 }
902 902
903 void AcceleratedSurface::WasHidden() { 903 void AcceleratedSurface::WasHidden() {
904 presenter_->WasHidden(); 904 presenter_->WasHidden();
905 } 905 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698