Lines Matching refs:hr
103 HRESULT hr = S_OK; in SkEncodeImageWithWIC() local
107 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
108 hr = CoCreateInstance( in SkEncodeImageWithWIC()
118 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
119 hr = SkWIStream::CreateFromSkWStream(stream, &piStream); in SkEncodeImageWithWIC()
124 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
125 hr = piImagingFactory->CreateEncoder(type, nullptr, &piEncoder); in SkEncodeImageWithWIC()
128 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
129 hr = piEncoder->Initialize(piStream.get(), WICBitmapEncoderNoCache); in SkEncodeImageWithWIC()
135 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
136 hr = piEncoder->CreateNewFrame(&piBitmapFrameEncode, &piPropertybag); in SkEncodeImageWithWIC()
139 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
157 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
158 hr = piBitmapFrameEncode->Initialize(piPropertybag.get()); in SkEncodeImageWithWIC()
164 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
165 hr = piBitmapFrameEncode->SetSize(width, height); in SkEncodeImageWithWIC()
171 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
172 hr = piBitmapFrameEncode->SetPixelFormat(&formatGUID); in SkEncodeImageWithWIC()
174 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
176 hr = IsEqualGUID(formatGUID, formatDesired) ? S_OK : E_FAIL; in SkEncodeImageWithWIC()
180 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
181 hr = piBitmapFrameEncode->WritePixels(height, in SkEncodeImageWithWIC()
187 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
188 hr = piBitmapFrameEncode->Commit(); in SkEncodeImageWithWIC()
191 if (SUCCEEDED(hr)) { in SkEncodeImageWithWIC()
192 hr = piEncoder->Commit(); in SkEncodeImageWithWIC()
195 return SUCCEEDED(hr); in SkEncodeImageWithWIC()